From 57dd8a22fc5b17b152fe68539debedecd01a93a8 Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Sun, 14 Apr 2019 19:42:39 +0200 Subject: ci: fix Nix environment to launch tests --- .travis.yml | 6 +- ci/default.nix | 5 + ci/pronto/Gemfile | 6 ++ ci/pronto/Gemfile.lock | 67 +++++++++++++ ci/pronto/default.nix | 10 ++ ci/pronto/gemset.nix | 266 +++++++++++++++++++++++++++++++++++++++++++++++++ default.nix | 7 ++ 7 files changed, 363 insertions(+), 4 deletions(-) create mode 100644 ci/default.nix create mode 100644 ci/pronto/Gemfile create mode 100644 ci/pronto/Gemfile.lock create mode 100644 ci/pronto/default.nix create mode 100644 ci/pronto/gemset.nix create mode 100644 default.nix diff --git a/.travis.yml b/.travis.yml index 74e9f59..346f62d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ --- language: nix before_script: - - nix-env -iA nixpkgs.hlint nixpkgs.ruby_2_6 - - gem install bundler + - nix-env -i -f default.nix script: - - bundle install - - bundle exec rake spec + - rake spec diff --git a/ci/default.nix b/ci/default.nix new file mode 100644 index 0000000..9aecd21 --- /dev/null +++ b/ci/default.nix @@ -0,0 +1,5 @@ +{ callPackage, hlint }: +{ + pronto = callPackage ./pronto {}; + inherit hlint; +} diff --git a/ci/pronto/Gemfile b/ci/pronto/Gemfile new file mode 100644 index 0000000..615ae47 --- /dev/null +++ b/ci/pronto/Gemfile @@ -0,0 +1,6 @@ +source "https://rubygems.org" + +gem "pronto" +gem "pronto-hlint" +gem "rspec" +gem "rake" diff --git a/ci/pronto/Gemfile.lock b/ci/pronto/Gemfile.lock new file mode 100644 index 0000000..683d4dd --- /dev/null +++ b/ci/pronto/Gemfile.lock @@ -0,0 +1,67 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + diff-lcs (1.3) + faraday (1.0.0) + multipart-post (>= 1.2, < 3) + gitlab (4.13.1) + httparty (~> 0.14, >= 0.14.0) + terminal-table (~> 1.5, >= 1.5.1) + httparty (0.18.0) + mime-types (~> 3.0) + multi_xml (>= 0.5.2) + mime-types (3.3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2019.1009) + multi_xml (0.6.0) + multipart-post (2.1.1) + octokit (4.16.0) + faraday (>= 0.9) + sawyer (~> 0.8.0, >= 0.5.3) + pronto (0.10.0) + gitlab (~> 4.0, >= 4.0.0) + httparty (>= 0.13.7) + octokit (~> 4.7, >= 4.7.0) + rainbow (>= 2.2, < 4.0) + rugged (~> 0.24, >= 0.23.0) + thor (~> 0.20.0) + pronto-hlint (0.1.0) + pronto (~> 0.10.0) + public_suffix (4.0.3) + rainbow (3.0.0) + rake (13.0.1) + rspec (3.9.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-core (3.9.1) + rspec-support (~> 3.9.1) + rspec-expectations (3.9.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.2) + rugged (0.28.4.1) + sawyer (0.8.2) + addressable (>= 2.3.5) + faraday (> 0.8, < 2.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thor (0.20.3) + unicode-display_width (1.6.1) + +PLATFORMS + ruby + +DEPENDENCIES + pronto + pronto-hlint + rake + rspec + +BUNDLED WITH + 1.17.3 diff --git a/ci/pronto/default.nix b/ci/pronto/default.nix new file mode 100644 index 0000000..fd668c9 --- /dev/null +++ b/ci/pronto/default.nix @@ -0,0 +1,10 @@ +{ bundlerEnv, ruby, hlint }: +let gems = import ./gemset.nix; +in + bundlerEnv { + name = "pronto-${gems.pronto.version}"; + inherit ruby; + gemfile = ./Gemfile; + lockfile = ./Gemfile.lock; + gemset = ./gemset.nix; + } diff --git a/ci/pronto/gemset.nix b/ci/pronto/gemset.nix new file mode 100644 index 0000000..fa412e1 --- /dev/null +++ b/ci/pronto/gemset.nix @@ -0,0 +1,266 @@ +{ + addressable = { + dependencies = ["public_suffix"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"; + type = "gem"; + }; + version = "2.7.0"; + }; + diff-lcs = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"; + type = "gem"; + }; + version = "1.3"; + }; + faraday = { + dependencies = ["multipart-post"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "11yn7mhi4rl24brs2qfwysas14csjf1zmb835cfklqz5ka032xp6"; + type = "gem"; + }; + version = "1.0.0"; + }; + gitlab = { + dependencies = ["httparty" "terminal-table"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "04m14gyacd2dbx8ddl6ka9yrvy8xykl1px1l2pyc347pi8q5nq3k"; + type = "gem"; + }; + version = "4.13.1"; + }; + httparty = { + dependencies = ["mime-types" "multi_xml"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0vzfzry2inyz9yd9x9zflm7rzwa3vlp9kl05ajpsxrx6gh8pzxy6"; + type = "gem"; + }; + version = "0.18.0"; + }; + mime-types = { + dependencies = ["mime-types-data"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1zj12l9qk62anvk9bjvandpa6vy4xslil15wl6wlivyf51z773vh"; + type = "gem"; + }; + version = "3.3.1"; + }; + mime-types-data = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "18x61fc36951vw7f74gq8cyybdpxvyg5d0azvqhrs82ddw3v16xh"; + type = "gem"; + }; + version = "3.2019.1009"; + }; + multi_xml = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"; + type = "gem"; + }; + version = "0.6.0"; + }; + multipart-post = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1zgw9zlwh2a6i1yvhhc4a84ry1hv824d6g2iw2chs3k5aylpmpfj"; + type = "gem"; + }; + version = "2.1.1"; + }; + octokit = { + dependencies = ["faraday" "sawyer"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "06kx258qa5k24q5pv8i4daaw3g57gif6p5k5h3gndj3q2jk6vhkn"; + type = "gem"; + }; + version = "4.16.0"; + }; + pronto = { + dependencies = ["gitlab" "httparty" "octokit" "rainbow" "rugged" "thor"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0n6pykyp5jcpgwcvdxyrhjc7n8w95m0pgixz6cpx0n8vwvw1vhlv"; + type = "gem"; + }; + version = "0.10.0"; + }; + pronto-hlint = { + dependencies = ["pronto"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1lfan7bgvyns8rb3qz4f5a56ylfqkjqyjc7hdi2qbnwcswldfqkg"; + type = "gem"; + }; + version = "0.1.0"; + }; + public_suffix = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1c6kq6s13idl2036b5lch8r7390f8w82cal8hcp4ml76fm2vdac7"; + type = "gem"; + }; + version = "4.0.3"; + }; + rainbow = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"; + type = "gem"; + }; + version = "3.0.0"; + }; + rake = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"; + type = "gem"; + }; + version = "13.0.1"; + }; + rspec = { + dependencies = ["rspec-core" "rspec-expectations" "rspec-mocks"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1hzsig4pi9ybr0xl5540m1swiyxa74c8h09225y5sdh2rjkkg84h"; + type = "gem"; + }; + version = "3.9.0"; + }; + rspec-core = { + dependencies = ["rspec-support"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1qzc1wdjb1qnbimjl8i1q1r1z5hdv2lmcw7ysz7jawj4d1cvpqvd"; + type = "gem"; + }; + version = "3.9.1"; + }; + rspec-expectations = { + dependencies = ["diff-lcs" "rspec-support"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1gjqfb39da6gywdcp4h77738r7khbrn2v4y45589z25bj4z9paf0"; + type = "gem"; + }; + version = "3.9.0"; + }; + rspec-mocks = { + dependencies = ["diff-lcs" "rspec-support"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "19vmdqym1v2g1zbdnq37zwmyj87y9yc9ijwc8js55igvbb9hx0mr"; + type = "gem"; + }; + version = "3.9.1"; + }; + rspec-support = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1zwpyq1na23pvgacpxs2v9nwfbjbw6x3arca5j3l1xagigqmzhc3"; + type = "gem"; + }; + version = "3.9.2"; + }; + rugged = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0rdidxgpk1b6y1jq9v77lcx5khq0s9q0s253lr8x57d3hk43iskx"; + type = "gem"; + }; + version = "0.28.4.1"; + }; + sawyer = { + dependencies = ["addressable" "faraday"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"; + type = "gem"; + }; + version = "0.8.2"; + }; + terminal-table = { + dependencies = ["unicode-display_width"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1512cngw35hsmhvw4c05rscihc59mnj09m249sm9p3pik831ydqk"; + type = "gem"; + }; + version = "1.8.0"; + }; + thor = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1yhrnp9x8qcy5vc7g438amd5j9sw83ih7c30dr6g6slgw9zj3g29"; + type = "gem"; + }; + version = "0.20.3"; + }; + unicode-display_width = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1pppclzq4qb26g321553nm9xqca3zgllvpwb2kqxsdadwj51s09x"; + type = "gem"; + }; + version = "1.6.1"; + }; +} \ No newline at end of file diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..319a18b --- /dev/null +++ b/default.nix @@ -0,0 +1,7 @@ +{ pkgs ? import {} }: + +with pkgs; + +let ci = callPackage ./ci/default.nix {}; + +in ci -- cgit v1.2.3 From 90673d25d1e823e7d9eae38a0fca60efaaf378e5 Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Mon, 2 Mar 2020 10:20:59 +0100 Subject: Remove gems lock file to avoid Security alerts from github This repo is a ruby gem (library) the dependencies specified by the gemspec are enough and commiting a lock file doesn't make sense (because dependencies are installed by `gem` or `bundle` when people pull the gem). --- gems.locked | 71 ------------------------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 gems.locked diff --git a/gems.locked b/gems.locked deleted file mode 100644 index 9a5d599..0000000 --- a/gems.locked +++ /dev/null @@ -1,71 +0,0 @@ -PATH - remote: . - specs: - pronto-hlint (0.1.0) - pronto (~> 0.10.0) - -GEM - remote: https://rubygems.org/ - specs: - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - byebug (11.0.1) - diff-lcs (1.3) - faraday (0.15.4) - multipart-post (>= 1.2, < 3) - gitlab (4.10.0) - httparty (~> 0.14, >= 0.14.0) - terminal-table (~> 1.5, >= 1.5.1) - httparty (0.16.4) - mime-types (~> 3.0) - multi_xml (>= 0.5.2) - mime-types (3.2.2) - mime-types-data (~> 3.2015) - mime-types-data (3.2019.0331) - multi_xml (0.6.0) - multipart-post (2.0.0) - octokit (4.14.0) - sawyer (~> 0.8.0, >= 0.5.3) - pronto (0.10.0) - gitlab (~> 4.0, >= 4.0.0) - httparty (>= 0.13.7) - octokit (~> 4.7, >= 4.7.0) - rainbow (>= 2.2, < 4.0) - rugged (~> 0.24, >= 0.23.0) - thor (~> 0.20.0) - public_suffix (3.0.3) - rainbow (3.0.0) - rake (12.3.2) - rspec (3.8.0) - rspec-core (~> 3.8.0) - rspec-expectations (~> 3.8.0) - rspec-mocks (~> 3.8.0) - rspec-core (3.8.0) - rspec-support (~> 3.8.0) - rspec-expectations (3.8.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-mocks (3.8.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-support (3.8.0) - rugged (0.28.1) - sawyer (0.8.1) - addressable (>= 2.3.5, < 2.6) - faraday (~> 0.8, < 1.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - thor (0.20.3) - unicode-display_width (1.5.0) - -PLATFORMS - ruby - -DEPENDENCIES - byebug (>= 9) - pronto-hlint! - rake (>= 11.0, < 13) - rspec (~> 3.4) - -BUNDLED WITH - 2.0.1 -- cgit v1.2.3 From 0e815dc35f57fb54ab4b0699961f4aa8148d310b Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Mon, 2 Mar 2020 10:22:11 +0100 Subject: update: bump ruby version to latest 2.6 version --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index 097a15a..57cf282 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.2 +2.6.5 -- cgit v1.2.3