infreemation 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8dc94208a00f57e43a434353bac8690a87c98da7c30fa1cfcbc198d002c7b10
4
- data.tar.gz: ce9dee685cb68a2e06a423826e6103dd1b0455201dfe1ac39534f6030d6a3dbf
3
+ metadata.gz: 2e01dcf757c760f60874ab63dd551cd2cbb48b53d77cd28a99a334bed299060e
4
+ data.tar.gz: c0a1fe774d9f57325627b48522cea20c8a0afb04759b6fae2cb3d2bfa0e5300f
5
5
  SHA512:
6
- metadata.gz: 21ddb0989906bb78580019b1d8657df193f250c4a10c50c58ae54e94021abb17f568272ab230c6b187768ffd0d2b50eb9bbdaeb50f8a22258385d094c79df215
7
- data.tar.gz: 1115d10f81cc35fc173dc3f74b674068ad7ccc30f31a136a079ac27a322a43f0e4796444f4009cd5546942d885a30c0092f22db13213b47fa375e5fe840a313c
6
+ metadata.gz: 6a33599e90e3c4aca2d45129671422fc545e993dab5be2af10795e8faee5b440c0064e7bed1cea0315425931841f2686e414bb6c97c7bede4a4d9e6cac70f38b
7
+ data.tar.gz: 4097316f5430ebfa70903fc14b12ec99ee5d2c2578dcffc77debae54d627a3044606764810c8187ad7e0f5885077626be4a5f21f582697b02322b0e646e95105
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: weekly
7
+ open-pull-requests-limit: 99
8
+ rebase-strategy: "disabled"
@@ -0,0 +1,31 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master, develop]
6
+ pull_request:
7
+
8
+ jobs:
9
+ rspec:
10
+ name: Ruby ${{ matrix.ruby }}
11
+ runs-on: ubuntu-20.04
12
+
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ include:
17
+ - { ruby: 2.6 }
18
+ - { ruby: 2.7 }
19
+
20
+ steps:
21
+ - uses: actions/checkout@v2
22
+
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+ bundler-cache: true
28
+
29
+ - name: Run tests
30
+ run: |
31
+ bundle exec rspec
@@ -0,0 +1,21 @@
1
+ name: RuboCop
2
+
3
+ on: [pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-20.04
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+
11
+ - name: Set up Ruby
12
+ uses: ruby/setup-ruby@v1
13
+ with:
14
+ ruby-version: 2.6
15
+
16
+ - name: Run RuboCop linter
17
+ uses: reviewdog/action-rubocop@v1
18
+ with:
19
+ github_token: ${{ secrets.github_token }}
20
+ rubocop_version: 1.10.0
21
+ rubocop_extensions: rubocop-performance:gemfile rubocop-rspec:gemfile
data/.rubocop.yml CHANGED
@@ -1,11 +1,30 @@
1
+ ---
2
+ require:
3
+ - rubocop-performance
4
+ - rubocop-rspec
5
+
1
6
  AllCops:
2
- TargetRubyVersion: 2.4
7
+ Exclude:
8
+ - 'bin/bundle'
9
+ - 'bin/rake'
10
+ - 'bin/rspec'
11
+ - 'bin/rubocop'
12
+ NewCops: enable
13
+ SuggestExtensions: false
14
+ TargetRubyVersion: 2.6
3
15
 
4
16
  Metrics/BlockLength:
5
17
  Exclude:
6
18
  - '*.gemspec'
7
19
  - 'spec/**/*_spec.rb'
8
20
 
21
+ Layout/LineLength:
22
+ Max: 80
23
+ IgnoredPatterns:
24
+ - '^\s*it\s+.*do$'
25
+ - '^\s*context\s+.*do$'
26
+ - '^\s*describe\s+.*do$'
27
+
9
28
  Layout/DotPosition:
10
29
  EnforcedStyle: trailing
11
30
 
@@ -15,14 +34,3 @@ Style/ClassAndModuleChildren:
15
34
  Style/MixinUsage:
16
35
  Exclude:
17
36
  - 'spec/spec_helper.rb'
18
-
19
- Lint/RaiseException:
20
- Enabled: true
21
- Lint/StructNewOverride:
22
- Enabled: true
23
- Style/HashEachMethods:
24
- Enabled: true
25
- Style/HashTransformKeys:
26
- Enabled: true
27
- Style/HashTransformValues:
28
- Enabled: true
data/Gemfile CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
-
7
5
  # Specify your gem's dependencies in infreemation.gemspec
8
6
  gemspec
7
+
8
+ gem 'pry'
9
+ gem 'rake'
10
+ gem 'rspec'
11
+ gem 'rubocop', require: false
12
+ gem 'rubocop-performance', require: false
13
+ gem 'rubocop-rspec', require: false
14
+ gem 'webmock'
data/Gemfile.lock CHANGED
@@ -1,83 +1,97 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- infreemation (0.2.2)
5
- json (~> 2.3)
6
- rest-client (~> 2.0.2)
4
+ infreemation (0.2.3)
5
+ json (~> 2.5.1)
6
+ rest-client (~> 2.1.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.5.2)
12
- public_suffix (>= 2.0.2, < 4.0)
13
- ast (2.4.0)
14
- crack (0.4.3)
15
- safe_yaml (~> 1.0.0)
16
- diff-lcs (1.3)
11
+ addressable (2.7.0)
12
+ public_suffix (>= 2.0.2, < 5.0)
13
+ ast (2.4.2)
14
+ coderay (1.1.3)
15
+ crack (0.4.5)
16
+ rexml
17
+ diff-lcs (1.4.4)
17
18
  domain_name (0.5.20190701)
18
19
  unf (>= 0.0.5, < 1.0.0)
19
- hashdiff (0.3.7)
20
+ hashdiff (1.0.1)
21
+ http-accept (1.7.0)
20
22
  http-cookie (1.0.3)
21
23
  domain_name (~> 0.5)
22
- jaro_winkler (1.5.4)
23
- json (2.3.1)
24
+ json (2.5.1)
25
+ method_source (1.0.0)
24
26
  mime-types (3.3.1)
25
27
  mime-types-data (~> 3.2015)
26
- mime-types-data (3.2020.0512)
28
+ mime-types-data (3.2021.0225)
27
29
  netrc (0.11.0)
28
- parallel (1.19.1)
29
- parser (2.7.1.3)
30
- ast (~> 2.4.0)
31
- public_suffix (3.0.2)
30
+ parallel (1.20.1)
31
+ parser (3.0.0.0)
32
+ ast (~> 2.4.1)
33
+ pry (0.14.0)
34
+ coderay (~> 1.1)
35
+ method_source (~> 1.0)
36
+ public_suffix (4.0.6)
32
37
  rainbow (3.0.0)
33
- rake (13.0.1)
34
- rest-client (2.0.2)
38
+ rake (13.0.3)
39
+ regexp_parser (2.1.1)
40
+ rest-client (2.1.0)
41
+ http-accept (>= 1.7.0, < 2.0)
35
42
  http-cookie (>= 1.0.2, < 2.0)
36
43
  mime-types (>= 1.16, < 4.0)
37
44
  netrc (~> 0.8)
38
45
  rexml (3.2.4)
39
- rspec (3.7.0)
40
- rspec-core (~> 3.7.0)
41
- rspec-expectations (~> 3.7.0)
42
- rspec-mocks (~> 3.7.0)
43
- rspec-core (3.7.1)
44
- rspec-support (~> 3.7.0)
45
- rspec-expectations (3.7.0)
46
+ rspec (3.10.0)
47
+ rspec-core (~> 3.10.0)
48
+ rspec-expectations (~> 3.10.0)
49
+ rspec-mocks (~> 3.10.0)
50
+ rspec-core (3.10.1)
51
+ rspec-support (~> 3.10.0)
52
+ rspec-expectations (3.10.1)
46
53
  diff-lcs (>= 1.2.0, < 2.0)
47
- rspec-support (~> 3.7.0)
48
- rspec-mocks (3.7.0)
54
+ rspec-support (~> 3.10.0)
55
+ rspec-mocks (3.10.2)
49
56
  diff-lcs (>= 1.2.0, < 2.0)
50
- rspec-support (~> 3.7.0)
51
- rspec-support (3.7.1)
52
- rubocop (0.81.0)
53
- jaro_winkler (~> 1.5.1)
57
+ rspec-support (~> 3.10.0)
58
+ rspec-support (3.10.2)
59
+ rubocop (1.11.0)
54
60
  parallel (~> 1.10)
55
- parser (>= 2.7.0.1)
61
+ parser (>= 3.0.0.0)
56
62
  rainbow (>= 2.2.2, < 4.0)
63
+ regexp_parser (>= 1.8, < 3.0)
57
64
  rexml
65
+ rubocop-ast (>= 1.2.0, < 2.0)
58
66
  ruby-progressbar (~> 1.7)
59
- unicode-display_width (>= 1.4.0, < 2.0)
60
- ruby-progressbar (1.10.1)
61
- safe_yaml (1.0.4)
67
+ unicode-display_width (>= 1.4.0, < 3.0)
68
+ rubocop-ast (1.4.1)
69
+ parser (>= 2.7.1.5)
70
+ rubocop-performance (1.10.1)
71
+ rubocop (>= 0.90.0, < 2.0)
72
+ rubocop-ast (>= 0.4.0)
73
+ rubocop-rspec (2.2.0)
74
+ rubocop (~> 1.0)
75
+ rubocop-ast (>= 1.1.0)
76
+ ruby-progressbar (1.11.0)
62
77
  unf (0.1.4)
63
78
  unf_ext
64
79
  unf_ext (0.0.7.7)
65
- unicode-display_width (1.7.0)
66
- webmock (3.3.0)
80
+ unicode-display_width (2.0.0)
81
+ webmock (3.12.1)
67
82
  addressable (>= 2.3.6)
68
83
  crack (>= 0.3.2)
69
- hashdiff
84
+ hashdiff (>= 0.4.0, < 2.0.0)
70
85
 
71
86
  PLATFORMS
72
87
  ruby
73
88
 
74
89
  DEPENDENCIES
75
- bundler (~> 1.16)
76
90
  infreemation!
77
- rake (~> 13.0)
78
- rspec (~> 3.0)
79
- rubocop (~> 0.81.0)
80
- webmock (~> 3.3.0)
81
-
82
- BUNDLED WITH
83
- 1.17.2
91
+ pry
92
+ rake
93
+ rspec
94
+ rubocop
95
+ rubocop-performance
96
+ rubocop-rspec
97
+ webmock
data/bin/console CHANGED
@@ -4,12 +4,12 @@
4
4
  require 'bundler/setup'
5
5
  require 'infreemation'
6
6
 
7
+ Infreemation.url = ENV['INFREEMATION_URL']
8
+ Infreemation.api_key = ENV['INFREEMATION_API_KEY']
9
+ Infreemation.username = ENV['INFREEMATION_USERNAME']
10
+
7
11
  # You can add fixtures and/or initialization code here to make experimenting
8
12
  # with your gem easier. You can also use a different console, if you like.
9
13
 
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require 'irb'
15
- IRB.start(__FILE__)
14
+ require 'pry'
15
+ Pry.start
data/infreemation.gemspec CHANGED
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'infreemation/version'
3
+ require_relative 'lib/infreemation/version'
6
4
 
7
5
  Gem::Specification.new do |spec|
8
6
  spec.name = 'infreemation'
@@ -15,30 +13,25 @@ Gem::Specification.new do |spec|
15
13
  'built specifically to manage FOI, EIR and SAR requests.'
16
14
  spec.homepage = 'https://github.com/mysociety/infreemation-ruby'
17
15
  spec.license = 'MIT'
16
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
18
17
 
19
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the
20
- # "allowed_push_host" to allow pushing to a single host or delete this section
21
- # to allow pushing to any host.
22
- if spec.respond_to?(:metadata)
23
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
24
- else
25
- raise 'RubyGems 2.0 or newer is required to protect against ' \
26
- 'public gem pushes.'
27
- end
18
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
19
+
20
+ spec.metadata['homepage_uri'] = spec.homepage
21
+ spec.metadata['source_code_uri'] = spec.homepage
28
22
 
29
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
30
- f.match(%r{^(test|spec|features)/})
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added
25
+ # into git.
26
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
27
+ `git ls-files -z`.split("\x0").reject do |f|
28
+ f.match(%r{^(test|spec|features)/})
29
+ end
31
30
  end
32
31
  spec.bindir = 'exe'
33
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
33
  spec.require_paths = ['lib']
35
34
 
36
- spec.add_dependency 'json', '~> 2.3'
37
- spec.add_dependency 'rest-client', '~> 2.0.2'
38
-
39
- spec.add_development_dependency 'bundler', '~> 1.16'
40
- spec.add_development_dependency 'rake', '~> 13.0'
41
- spec.add_development_dependency 'rspec', '~> 3.0'
42
- spec.add_development_dependency 'rubocop', '~> 0.81.0'
43
- spec.add_development_dependency 'webmock', '~> 3.3.0'
35
+ spec.add_dependency 'json', '~> 2.5.1'
36
+ spec.add_dependency 'rest-client', '~> 2.1.0'
44
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Infreemation
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infreemation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mySociety
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-07 00:00:00.000000000 Z
11
+ date: 1980-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -16,98 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.3'
19
+ version: 2.5.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.3'
26
+ version: 2.5.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rest-client
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.2
33
+ version: 2.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.0.2
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.16'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.16'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '13.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '13.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.81.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.81.0
97
- - !ruby/object:Gem::Dependency
98
- name: webmock
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 3.3.0
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 3.3.0
40
+ version: 2.1.0
111
41
  description: Infreemation is a eCase management software system built specifically
112
42
  to manage FOI, EIR and SAR requests.
113
43
  email:
@@ -116,7 +46,9 @@ executables: []
116
46
  extensions: []
117
47
  extra_rdoc_files: []
118
48
  files:
119
- - ".github/workflows/ruby.yml"
49
+ - ".github/dependabot.yml"
50
+ - ".github/workflows/ci.yml"
51
+ - ".github/workflows/rubocop.yml"
120
52
  - ".gitignore"
121
53
  - ".rubocop.yml"
122
54
  - CODE_OF_CONDUCT.md
@@ -138,7 +70,9 @@ licenses:
138
70
  - MIT
139
71
  metadata:
140
72
  allowed_push_host: https://rubygems.org
141
- post_install_message:
73
+ homepage_uri: https://github.com/mysociety/infreemation-ruby
74
+ source_code_uri: https://github.com/mysociety/infreemation-ruby
75
+ post_install_message:
142
76
  rdoc_options: []
143
77
  require_paths:
144
78
  - lib
@@ -146,15 +80,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
80
  requirements:
147
81
  - - ">="
148
82
  - !ruby/object:Gem::Version
149
- version: '0'
83
+ version: 2.6.0
150
84
  required_rubygems_version: !ruby/object:Gem::Requirement
151
85
  requirements:
152
86
  - - ">="
153
87
  - !ruby/object:Gem::Version
154
88
  version: '0'
155
89
  requirements: []
156
- rubygems_version: 3.0.3
157
- signing_key:
90
+ rubygems_version: 3.1.3
91
+ signing_key:
158
92
  specification_version: 4
159
93
  summary: Ruby library for the Infreemation API.
160
94
  test_files: []
@@ -1,40 +0,0 @@
1
- name: Ruby
2
-
3
- on:
4
- push:
5
- branches: [ master, develop ]
6
- pull_request:
7
- branches: [ master, develop ]
8
-
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- strategy:
14
- matrix:
15
- ruby: [2.5, 2.6]
16
- steps:
17
- - uses: actions/checkout@v2
18
-
19
- - uses: actions/cache@v1
20
- with:
21
- path: vendor/bundle
22
- key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
23
- restore-keys: |
24
- ${{ runner.os }}-gems-
25
-
26
- - name: Set up Ruby
27
- uses: ruby/setup-ruby@v1.29.0
28
- with:
29
- ruby-version: ${{ matrix.ruby }}
30
-
31
- - name: Install gems
32
- run: |
33
- bundle config path vendor/bundle
34
- bundle install --jobs 4 --retry 3
35
-
36
- - name: Run tests
37
- env:
38
- RAILS_ENV: test
39
- run: |
40
- bundle exec rake