rom-http 0.7.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +81 -28
  3. data/README.md +15 -181
  4. data/lib/rom/http/associations/many_to_many.rb +12 -0
  5. data/lib/rom/http/associations/many_to_one.rb +20 -0
  6. data/lib/rom/http/associations/one_to_many.rb +20 -0
  7. data/lib/rom/http/associations/one_to_one.rb +12 -0
  8. data/lib/rom/http/associations.rb +14 -0
  9. data/lib/rom/http/attribute.rb +10 -0
  10. data/lib/rom/http/commands/create.rb +2 -0
  11. data/lib/rom/http/commands/delete.rb +2 -0
  12. data/lib/rom/http/commands/update.rb +2 -0
  13. data/lib/rom/http/commands.rb +6 -4
  14. data/lib/rom/http/dataset.rb +212 -115
  15. data/lib/rom/http/error.rb +2 -0
  16. data/lib/rom/http/gateway.rb +47 -6
  17. data/lib/rom/http/handlers/json.rb +64 -0
  18. data/lib/rom/http/handlers.rb +16 -0
  19. data/lib/rom/http/mapper_compiler.rb +11 -0
  20. data/lib/rom/http/relation.rb +22 -66
  21. data/lib/rom/http/schema/dsl.rb +12 -0
  22. data/lib/rom/http/schema.rb +40 -0
  23. data/lib/rom/http/transformer.rb +2 -0
  24. data/lib/rom/http/types.rb +13 -0
  25. data/lib/rom/http/version.rb +3 -1
  26. data/lib/rom/http.rb +9 -6
  27. data/lib/rom-http.rb +3 -1
  28. metadata +41 -120
  29. data/.gitignore +0 -16
  30. data/.rspec +0 -3
  31. data/.rubocop.yml +0 -22
  32. data/.rubocop_todo.yml +0 -12
  33. data/.travis.yml +0 -20
  34. data/Gemfile +0 -24
  35. data/LICENSE.txt +0 -22
  36. data/Rakefile +0 -24
  37. data/examples/repository_with_combine.rb +0 -154
  38. data/lib/rom/http/dataset/class_interface.rb +0 -33
  39. data/rakelib/rubocop.rake +0 -18
  40. data/rom-http.gemspec +0 -32
  41. data/spec/integration/abstract/commands/create_spec.rb +0 -119
  42. data/spec/integration/abstract/commands/delete_spec.rb +0 -52
  43. data/spec/integration/abstract/commands/update_spec.rb +0 -119
  44. data/spec/integration/abstract/relation_spec.rb +0 -78
  45. data/spec/shared/setup.rb +0 -18
  46. data/spec/shared/users_and_tasks.rb +0 -30
  47. data/spec/spec_helper.rb +0 -19
  48. data/spec/support/mutant.rb +0 -10
  49. data/spec/unit/rom/http/dataset_spec.rb +0 -824
  50. data/spec/unit/rom/http/gateway_spec.rb +0 -69
  51. data/spec/unit/rom/http/relation_spec.rb +0 -268
@@ -1,32 +1,34 @@
1
- require 'dry/core/cache'
2
- require 'rom/initializer'
3
- require 'rom/http/transformer'
1
+ # frozen_string_literal: true
2
+
3
+ require "rom/initializer"
4
+
5
+ require "rom/http/types"
6
+ require "rom/http/attribute"
7
+ require "rom/http/schema"
8
+ require "rom/http/schema/dsl"
4
9
 
5
10
  module ROM
6
11
  module HTTP
7
12
  # HTTP-specific relation extensions
8
13
  #
9
14
  class Relation < ROM::Relation
10
- extend Dry::Core::Cache
11
- extend ::ROM::Initializer
12
- include Enumerable
15
+ include ROM::HTTP
13
16
 
14
17
  adapter :http
15
18
 
16
- option :transformer, reader: true, default: proc { ::ROM::HTTP::Transformer }
19
+ schema_class HTTP::Schema
20
+ schema_dsl HTTP::Schema::DSL
21
+ schema_attr_class HTTP::Attribute
22
+
23
+ option :output_schema, default: -> { schema.to_output_hash }
17
24
 
18
25
  forward :with_headers, :add_header, :with_options,
19
26
  :with_base_path, :with_path, :append_path,
20
- :with_request_method, :with_params, :add_params
27
+ :with_request_method, :with_query_params, :add_query_params,
28
+ :with_body_params, :add_body_params
21
29
 
22
30
  def primary_key
23
- attribute = schema.find(&:primary_key?)
24
-
25
- if attribute
26
- attribute.alias || attribute.name
27
- else
28
- :id
29
- end
31
+ schema.primary_key_name
30
32
  end
31
33
 
32
34
  def project(*names)
@@ -34,7 +36,7 @@ module ROM
34
36
  end
35
37
 
36
38
  def exclude(*names)
37
- with(schema: schema.exclude(*names.flatten))
39
+ with(schema: schema.exclude(*names))
38
40
  end
39
41
 
40
42
  def rename(mapping)
@@ -45,67 +47,21 @@ module ROM
45
47
  with(schema: schema.prefix(prefix))
46
48
  end
47
49
 
48
- def wrap(prefix = dataset.name)
49
- with(schema: schema.wrap(prefix))
50
- end
51
-
52
- def to_a
53
- with_transformation { super }
54
- end
55
-
56
50
  # @see Dataset#insert
57
- def insert(*args)
58
- with_transformation { dataset.insert(*args) }
51
+ def insert(*tuples)
52
+ dataset.insert(*tuples.map { |t| input_schema[t] })
59
53
  end
60
54
  alias_method :<<, :insert
61
55
 
62
56
  # @see Dataset#update
63
- def update(*args)
64
- with_transformation { dataset.update(*args) }
57
+ def update(*tuples)
58
+ dataset.update(*tuples.map { |t| input_schema[t] })
65
59
  end
66
60
 
67
61
  # @see Dataset#delete
68
62
  def delete
69
63
  dataset.delete
70
64
  end
71
-
72
- private
73
-
74
- def with_transformation
75
- tuples = yield
76
-
77
- transformed = with_schema_proc do |proc|
78
- transformer_proc[Array([tuples]).flatten(1).map(&proc.method(:call))]
79
- end
80
-
81
- tuples.kind_of?(Array) ? transformed : transformed.first
82
- end
83
-
84
- def with_schema_proc
85
- schema_proc = fetch_or_store(schema) do
86
- Types::Coercible::Hash.schema(schema.to_h)
87
- end
88
-
89
- yield(schema_proc)
90
- end
91
-
92
- def transformer_proc
93
- if mapped?
94
- transformer[:map_array, transformer[:rename_keys, mapping]]
95
- else
96
- transformer[:identity]
97
- end
98
- end
99
-
100
- def mapped?
101
- mapping.any?
102
- end
103
-
104
- def mapping
105
- schema.each_with_object({}) do |attr, mapping|
106
- mapping[attr.name] = attr.alias if attr.alias
107
- end
108
- end
109
65
  end
110
66
  end
111
67
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rom/schema/dsl"
4
+
5
+ module ROM
6
+ module HTTP
7
+ class Schema < ROM::Schema
8
+ class DSL < ROM::Schema::DSL
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rom/schema"
4
+ require "rom/http/types"
5
+
6
+ module ROM
7
+ module HTTP
8
+ class Schema < ROM::Schema
9
+ # Customized output hash constructor which symbolizes keys
10
+ # and optionally applies custom read-type coercions
11
+ #
12
+ # @api private
13
+ def to_output_hash
14
+ Types::Hash
15
+ .schema(map { |attr| [attr.key, attr.to_read_type] }.to_h)
16
+ .with_key_transform(&:to_sym)
17
+ end
18
+
19
+ # To maintain compatibility with other adapters
20
+ #
21
+ # @api private
22
+ def qualified
23
+ self
24
+ end
25
+
26
+ # Internal hook used during setup process
27
+ #
28
+ # @see Schema#finalize_associations!
29
+ #
30
+ # @api private
31
+ def finalize_associations!(relations:)
32
+ super do
33
+ associations.map do |definition|
34
+ HTTP::Associations.const_get(definition.type).new(definition, relations)
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ROM
2
4
  module HTTP
3
5
  # Transformer
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rom/types"
4
+
5
+ module ROM
6
+ module HTTP
7
+ module Types
8
+ include ROM::Types
9
+
10
+ Path = Coercible::String.constructor { |s| s.sub(%r{\A/}, "") }
11
+ end
12
+ end
13
+ end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ROM
2
4
  module HTTP
3
- VERSION = '0.7.0'.freeze
5
+ VERSION = "0.9.0"
4
6
  end
5
7
  end
data/lib/rom/http.rb CHANGED
@@ -1,8 +1,11 @@
1
- require 'rom'
2
- require 'rom/http/error'
3
- require 'rom/http/commands'
4
- require 'rom/http/gateway'
5
- require 'rom/http/relation'
6
- require 'rom/http/version'
1
+ # frozen_string_literal: true
2
+
3
+ require "rom"
4
+ require "rom/http/error"
5
+ require "rom/http/commands"
6
+ require "rom/http/associations"
7
+ require "rom/http/gateway"
8
+ require "rom/http/relation"
9
+ require "rom/http/version"
7
10
 
8
11
  ROM.register_adapter(:http, ROM::HTTP)
data/lib/rom-http.rb CHANGED
@@ -1 +1,3 @@
1
- require 'rom/http'
1
+ # frozen_string_literal: true
2
+
3
+ require "rom/http"
metadata CHANGED
@@ -1,79 +1,79 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rom-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  - Andy Holland
9
9
  - Chris Flipse
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-01-11 00:00:00.000000000 Z
13
+ date: 2022-09-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: concurrent-ruby
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ">="
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: '1.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ">="
26
+ - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '0'
28
+ version: '1.1'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: addressable
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ">="
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '0'
35
+ version: '2.6'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ">="
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '0'
42
+ version: '2.6'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rom
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '4.0'
49
+ version: '5.0'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 5.0.1
50
53
  type: :runtime
51
54
  prerelease: false
52
55
  version_requirements: !ruby/object:Gem::Requirement
53
56
  requirements:
54
57
  - - "~>"
55
58
  - !ruby/object:Gem::Version
56
- version: '4.0'
59
+ version: '5.0'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 5.0.1
57
63
  - !ruby/object:Gem::Dependency
58
64
  name: dry-core
59
65
  requirement: !ruby/object:Gem::Requirement
60
66
  requirements:
61
67
  - - "~>"
62
68
  - !ruby/object:Gem::Version
63
- version: '0.2'
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: 0.2.3
69
+ version: '0.4'
67
70
  type: :runtime
68
71
  prerelease: false
69
72
  version_requirements: !ruby/object:Gem::Requirement
70
73
  requirements:
71
74
  - - "~>"
72
75
  - !ruby/object:Gem::Version
73
- version: '0.2'
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: 0.2.3
76
+ version: '0.4'
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: dry-equalizer
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -94,70 +94,14 @@ dependencies:
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '0.6'
97
+ version: '0.13'
98
98
  type: :runtime
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '0.6'
105
- - !ruby/object:Gem::Dependency
106
- name: bundler
107
- requirement: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
- type: :development
113
- prerelease: false
114
- version_requirements: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- - !ruby/object:Gem::Dependency
120
- name: rspec
121
- requirement: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - "~>"
124
- - !ruby/object:Gem::Version
125
- version: '3.1'
126
- type: :development
127
- prerelease: false
128
- version_requirements: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - "~>"
131
- - !ruby/object:Gem::Version
132
- version: '3.1'
133
- - !ruby/object:Gem::Dependency
134
- name: rspec-its
135
- requirement: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- version: '0'
140
- type: :development
141
- prerelease: false
142
- version_requirements: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- version: '0'
147
- - !ruby/object:Gem::Dependency
148
- name: rake
149
- requirement: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - "~>"
152
- - !ruby/object:Gem::Version
153
- version: '10.0'
154
- type: :development
155
- prerelease: false
156
- version_requirements: !ruby/object:Gem::Requirement
157
- requirements:
158
- - - "~>"
159
- - !ruby/object:Gem::Version
160
- version: '10.0'
104
+ version: '0.13'
161
105
  description: HTTP support for ROM
162
106
  email:
163
107
  - piotr.solnica@gmail.com
@@ -167,48 +111,37 @@ executables: []
167
111
  extensions: []
168
112
  extra_rdoc_files: []
169
113
  files:
170
- - ".gitignore"
171
- - ".rspec"
172
- - ".rubocop.yml"
173
- - ".rubocop_todo.yml"
174
- - ".travis.yml"
175
114
  - CHANGELOG.md
176
- - Gemfile
177
- - LICENSE.txt
178
115
  - README.md
179
- - Rakefile
180
- - examples/repository_with_combine.rb
181
116
  - lib/rom-http.rb
182
117
  - lib/rom/http.rb
118
+ - lib/rom/http/associations.rb
119
+ - lib/rom/http/associations/many_to_many.rb
120
+ - lib/rom/http/associations/many_to_one.rb
121
+ - lib/rom/http/associations/one_to_many.rb
122
+ - lib/rom/http/associations/one_to_one.rb
123
+ - lib/rom/http/attribute.rb
183
124
  - lib/rom/http/commands.rb
184
125
  - lib/rom/http/commands/create.rb
185
126
  - lib/rom/http/commands/delete.rb
186
127
  - lib/rom/http/commands/update.rb
187
128
  - lib/rom/http/dataset.rb
188
- - lib/rom/http/dataset/class_interface.rb
189
129
  - lib/rom/http/error.rb
190
130
  - lib/rom/http/gateway.rb
131
+ - lib/rom/http/handlers.rb
132
+ - lib/rom/http/handlers/json.rb
133
+ - lib/rom/http/mapper_compiler.rb
191
134
  - lib/rom/http/relation.rb
135
+ - lib/rom/http/schema.rb
136
+ - lib/rom/http/schema/dsl.rb
192
137
  - lib/rom/http/transformer.rb
138
+ - lib/rom/http/types.rb
193
139
  - lib/rom/http/version.rb
194
- - rakelib/rubocop.rake
195
- - rom-http.gemspec
196
- - spec/integration/abstract/commands/create_spec.rb
197
- - spec/integration/abstract/commands/delete_spec.rb
198
- - spec/integration/abstract/commands/update_spec.rb
199
- - spec/integration/abstract/relation_spec.rb
200
- - spec/shared/setup.rb
201
- - spec/shared/users_and_tasks.rb
202
- - spec/spec_helper.rb
203
- - spec/support/mutant.rb
204
- - spec/unit/rom/http/dataset_spec.rb
205
- - spec/unit/rom/http/gateway_spec.rb
206
- - spec/unit/rom/http/relation_spec.rb
207
- homepage: http://rom-rb.org
140
+ homepage: https://rom-rb.org
208
141
  licenses:
209
142
  - MIT
210
143
  metadata: {}
211
- post_install_message:
144
+ post_install_message:
212
145
  rdoc_options: []
213
146
  require_paths:
214
147
  - lib
@@ -216,27 +149,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
149
  requirements:
217
150
  - - ">="
218
151
  - !ruby/object:Gem::Version
219
- version: '0'
152
+ version: 2.7.0
220
153
  required_rubygems_version: !ruby/object:Gem::Requirement
221
154
  requirements:
222
155
  - - ">="
223
156
  - !ruby/object:Gem::Version
224
157
  version: '0'
225
158
  requirements: []
226
- rubyforge_project:
227
- rubygems_version: 2.6.13
228
- signing_key:
159
+ rubygems_version: 3.1.2
160
+ signing_key:
229
161
  specification_version: 4
230
162
  summary: HTTP support for ROM
231
- test_files:
232
- - spec/integration/abstract/commands/create_spec.rb
233
- - spec/integration/abstract/commands/delete_spec.rb
234
- - spec/integration/abstract/commands/update_spec.rb
235
- - spec/integration/abstract/relation_spec.rb
236
- - spec/shared/setup.rb
237
- - spec/shared/users_and_tasks.rb
238
- - spec/spec_helper.rb
239
- - spec/support/mutant.rb
240
- - spec/unit/rom/http/dataset_spec.rb
241
- - spec/unit/rom/http/gateway_spec.rb
242
- - spec/unit/rom/http/relation_spec.rb
163
+ test_files: []
data/.gitignore DELETED
@@ -1,16 +0,0 @@
1
- /.bundle
2
- /.yardoc
3
- /_yardoc
4
- /coverage
5
- /vendor
6
- /doc
7
- /pkg
8
- /spec/reports
9
- /tmp
10
- Gemfile.lock
11
- *.bundle
12
- *.so
13
- *.o
14
- *.a
15
- mkmf.log
16
- log/*.log
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --require=spec_helper
2
- --color
3
- --order random
data/.rubocop.yml DELETED
@@ -1,22 +0,0 @@
1
- # Generated by `rubocop --auto-gen-config`
2
- inherit_from: .rubocop_todo.yml
3
-
4
- Metrics/LineLength:
5
- Max: 100
6
-
7
- Style/CaseEquality:
8
- Enabled: false
9
-
10
- # No need to handle LoadError in Rakefile
11
- Lint/HandleExceptions:
12
- Exclude:
13
- - Rakefile
14
- - rakelib/rubocop.rake
15
-
16
- # Documentation checked by Inch CI
17
- Style/Documentation:
18
- Enabled: false
19
-
20
- # Allow rom-http
21
- Style/FileName:
22
- Enabled: false
data/.rubocop_todo.yml DELETED
@@ -1,12 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2015-09-16 21:35:53 +0100 using RuboCop version 0.34.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Configuration parameters: CountComments.
11
- Metrics/ClassLength:
12
- Max: 118
data/.travis.yml DELETED
@@ -1,20 +0,0 @@
1
- language: ruby
2
- dist: trusty
3
- sudo: required
4
- cache: bundler
5
- bundler_args: --without sql benchmarks console tools
6
- script: "bundle exec rake ci"
7
- rvm:
8
- - 2.3.4
9
- - 2.4.1
10
- - jruby-9.1.13.0
11
- env:
12
- global:
13
- - JRUBY_OPTS='--dev -J-Xmx1024M'
14
- notifications:
15
- webhooks:
16
- urls:
17
- - https://webhooks.gitter.im/e/39e1225f489f38b0bd09
18
- on_success: change
19
- on_failure: always
20
- on_start: false
data/Gemfile DELETED
@@ -1,24 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'rom-repository', '~> 2.0'
6
-
7
- group :test do
8
- gem 'rom', '~> 4.0'
9
- gem 'faraday'
10
- gem 'inflecto'
11
- end
12
-
13
- group :tools do
14
- gem 'byebug'
15
- gem 'guard'
16
- gem 'guard-rspec'
17
- gem 'guard-rubocop'
18
- gem 'rubocop', '~> 0.28'
19
-
20
- platform :mri do
21
- gem 'mutant', '>= 0.8.0', github: 'mbj/mutant', branch: 'master'
22
- gem 'mutant-rspec'
23
- end
24
- end
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2015 Ruby Object Mapper Team
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile DELETED
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env rake
2
- require 'bundler/gem_tasks'
3
-
4
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
5
-
6
- require 'rspec/core'
7
- require 'rspec/core/rake_task'
8
-
9
- RSpec::Core::RakeTask.new(:spec)
10
- task default: [:ci]
11
-
12
- desc 'Run CI tasks'
13
- task ci: [:spec]
14
-
15
- begin
16
- require 'rubocop/rake_task'
17
-
18
- Rake::Task[:default].enhance [:rubocop]
19
-
20
- RuboCop::RakeTask.new do |task|
21
- task.options << '--display-cop-names'
22
- end
23
- rescue LoadError
24
- end