clowne 1.3.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -1
  3. data/README.md +1 -4
  4. data/lib/clowne/adapters/active_record/associations/belongs_to.rb +0 -1
  5. data/lib/clowne/adapters/active_record/associations/has_one.rb +0 -1
  6. data/lib/clowne/adapters/active_record/associations/noop.rb +1 -1
  7. data/lib/clowne/adapters/active_record/associations.rb +1 -1
  8. data/lib/clowne/adapters/active_record/resolvers/association.rb +0 -1
  9. data/lib/clowne/adapters/base/association.rb +1 -1
  10. data/lib/clowne/adapters/base.rb +2 -2
  11. data/lib/clowne/adapters/sequel/associations/one_to_many.rb +0 -4
  12. data/lib/clowne/adapters/sequel/associations.rb +1 -1
  13. data/lib/clowne/adapters/sequel/resolvers/association.rb +0 -1
  14. data/lib/clowne/cloner.rb +1 -1
  15. data/lib/clowne/declarations/trait.rb +1 -1
  16. data/lib/clowne/declarations.rb +1 -1
  17. data/lib/clowne/ext/record_key.rb +1 -1
  18. data/lib/clowne/resolvers/after_clone.rb +2 -1
  19. data/lib/clowne/resolvers/init_as.rb +0 -1
  20. data/lib/clowne/rspec/clone_association.rb +0 -1
  21. data/lib/clowne/version.rb +1 -1
  22. data/lib/clowne.rb +2 -3
  23. metadata +7 -110
  24. data/.codeclimate.yml +0 -7
  25. data/.gitattributes +0 -1
  26. data/.gitignore +0 -16
  27. data/.rspec +0 -3
  28. data/.rubocop.yml +0 -28
  29. data/.rufo +0 -3
  30. data/.travis.yml +0 -45
  31. data/Gemfile +0 -20
  32. data/Rakefile +0 -8
  33. data/bin/console +0 -14
  34. data/bin/setup +0 -8
  35. data/clowne.gemspec +0 -36
  36. data/docs/.nojekyll +0 -0
  37. data/docs/.rubocop.yml +0 -18
  38. data/docs/CNAME +0 -1
  39. data/docs/README.md +0 -131
  40. data/docs/_sidebar.md +0 -25
  41. data/docs/active_record.md +0 -33
  42. data/docs/after_clone.md +0 -53
  43. data/docs/after_persist.md +0 -77
  44. data/docs/architecture.md +0 -138
  45. data/docs/assets/docsify.min.js +0 -1
  46. data/docs/assets/prism-ruby.min.js +0 -1
  47. data/docs/assets/styles.css +0 -348
  48. data/docs/assets/vue.css +0 -1
  49. data/docs/clone_mapper.md +0 -59
  50. data/docs/customization.md +0 -63
  51. data/docs/exclude_association.md +0 -61
  52. data/docs/finalize.md +0 -31
  53. data/docs/from_v02_to_v1.md +0 -83
  54. data/docs/getting_started.md +0 -171
  55. data/docs/implicit_cloner.md +0 -33
  56. data/docs/include_association.md +0 -133
  57. data/docs/index.html +0 -29
  58. data/docs/init_as.md +0 -40
  59. data/docs/inline_configuration.md +0 -37
  60. data/docs/nullify.md +0 -33
  61. data/docs/operation.md +0 -55
  62. data/docs/parameters.md +0 -112
  63. data/docs/sequel.md +0 -50
  64. data/docs/supported_adapters.md +0 -10
  65. data/docs/testing.md +0 -194
  66. data/docs/traits.md +0 -25
  67. data/gemfiles/activerecord42.gemfile +0 -9
  68. data/gemfiles/jruby.gemfile +0 -10
  69. data/gemfiles/railsmaster.gemfile +0 -10
  70. data/lib/clowne/ext/yield_self_then.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f0d72961e8144605b8f0dbd7953161f17ec4c585c67b3e5bde80d84b3664f1b
4
- data.tar.gz: 5981d937f60d54993ab6bee595598dbc0b52ac99e38e29ef84f5007661929c5b
3
+ metadata.gz: 004ac1ee9bc76bef1a90a30081f5ab68445d063cc8a7d4ebae671d654a295c4f
4
+ data.tar.gz: c40aed0331904a7b1752f08c04f9be2b1551fe0b9c8d0712be62adfb4c65e57c
5
5
  SHA512:
6
- metadata.gz: ecd7010d94b67e2f0c9f19d2dbde4b6b302481156be2657199d6d9fa98c142807f1b006ddb306a2fd8cb3b2d72b3fd4e1708e34c5fe3541ddd0b2320b5e63112
7
- data.tar.gz: d56c783b4eed7af9ac5e478cfc2b2154b74644ea03fcc84f9fb7bd54c4e2ac8505355bd0ba0405c96255046232f3eee12c83671ef64173f29097ab859a9e428f
6
+ metadata.gz: eff581f8bf40d555fd3d446f6f5bbbb36c013fbf9a669e3c978d72ca85fd3ad2977d7c23ab3edc16356a76f07926558ca81619100993a5fa599c747dc88d4937
7
+ data.tar.gz: 45af78b6c47d140cfd80292141946f460350a382704c4125199ac7ffbcb23913da2a75f75cb575a3a9bf470350c8530360ddd326362eea611bf88af9b1e94a8c
data/CHANGELOG.md CHANGED
@@ -1,7 +1,24 @@
1
1
  # Change log
2
2
 
3
- ## 1.1.0 (2019-03-20)
3
+ ## 1.5.0 (2023-08-25)
4
+
5
+ - Ruby 3.2 compatibility. ([@sgerrand][])
6
+ - **Ruby 2.7 is required.**
7
+
8
+ ## 1.3.0 (2021-05-11)
9
+
10
+ - Added Ruby 3.0 support ([@pomartel][])
11
+ - Fixed Ruby 2.7 warnings ([@mpestov][])
4
12
 
13
+ ## 1.2.0 (2020-07-03)
14
+
15
+ - Added TruffleRuby support ([@ssnickolay][])
16
+ - Added Ruby 2.7 support ([@Sub-Xaero][])
17
+ - Fixed JRuby support
18
+ - Fixed all dependencies vulnerabilities
19
+ - Documents moved to Docsify engine ([@ssnickolay][])
20
+
21
+ ## 1.1.0 (2019-03-20)
5
22
 
6
23
  - Add `after_clone` declaration. ([@elardo][])
7
24
  - Add opporotunity to include belongs_to association for active_record adapter. ([@madding][])
@@ -44,3 +61,7 @@ See [migration guide](https://clowne.evilmartians.io/docs/from_v02_to_v10.html)
44
61
  [@ssnickolay]: https://github.com/ssnickolay
45
62
  [@elardo]: https://github.com/elardo
46
63
  [@madding]: https://github.com/madding
64
+ [@pomartel]: https://github.com/pomartel
65
+ [@mpestov]: https://github.com/mpestov
66
+ [@Sub-Xaero]: https://github.com/Sub-Xaero
67
+ [@sgerrand]: https://github.com/sgerrand
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/clowne.svg)](https://badge.fury.io/rb/clowne)
2
- [![Build Status](https://travis-ci.org/clowne-rb/clowne.svg?branch=master)](https://travis-ci.org/clowne-rb/clowne)
3
- [![Test Coverage](https://api.codeclimate.com/v1/badges/9143c4f91e9d1d2a4bd1/test_coverage)](https://codeclimate.com/github/clowne-rb/clowne/test_coverage)
4
- [![Maintainability](https://api.codeclimate.com/v1/badges/9143c4f91e9d1d2a4bd1/maintainability)](https://codeclimate.com/github/clowne-rb/clowne/maintainability)
2
+ [![Build Status](https://github.com/clowne-rb/clowne/actions/workflows/rspec.yml/badge.svg?branch=master)](https://github.com/clowne-rb/clowne/actions?query=branch%3Amaster+)
5
3
  [![Docs](https://img.shields.io/badge/docs-link-brightgreen.svg)](https://clowne.evilmartians.io)
6
4
 
7
5
  # Clowne
@@ -15,7 +13,6 @@ A flexible gem for cloning your models. Clowne focuses on ease of use and provid
15
13
  <a href="https://evilmartians.com/">
16
14
  <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"></a>
17
15
 
18
-
19
16
  ## Installation
20
17
 
21
18
  To install Clowne with RubyGems:
@@ -5,7 +5,6 @@ module Clowne
5
5
  class ActiveRecord
6
6
  module Associations
7
7
  class BelongsTo < Base
8
- # rubocop: disable Metrics/MethodLength
9
8
  def call(record)
10
9
  child = association
11
10
  return record unless child
@@ -5,7 +5,6 @@ module Clowne
5
5
  class ActiveRecord
6
6
  module Associations
7
7
  class HasOne < Base
8
- # rubocop: disable Metrics/MethodLength
9
8
  def call(record)
10
9
  child = association
11
10
  return record unless child
@@ -7,7 +7,7 @@ module Clowne
7
7
  class Noop < Base
8
8
  def call(record)
9
9
  warn(
10
- "[Clowne] Reflection #{reflection.class.name} is not supported "\
10
+ "[Clowne] Reflection #{reflection.class.name} is not supported " \
11
11
  "(#{@association_name} for #{@source.class})"
12
12
  )
13
13
  record
@@ -15,7 +15,7 @@ module Clowne
15
15
  belongs_to: BelongsTo,
16
16
  has_one: HasOne,
17
17
  has_many: HasMany,
18
- has_and_belongs_to_many: HABTM,
18
+ has_and_belongs_to_many: HABTM
19
19
  }.freeze
20
20
 
21
21
  # Returns an association cloner class for reflection
@@ -8,7 +8,6 @@ module Clowne
8
8
 
9
9
  class Association
10
10
  class << self
11
- # rubocop: disable Metrics/ParameterLists
12
11
  def call(source, record, declaration, adapter:, params:, **_options)
13
12
  reflection = source.class.reflections[declaration.name.to_s]
14
13
 
@@ -57,7 +57,7 @@ module Clowne
57
57
  def cloner_for(child)
58
58
  return declaration.clone_with if declaration.clone_with
59
59
 
60
- return child.class.cloner_class if child.class.respond_to?(:cloner_class)
60
+ child.class.cloner_class if child.class.respond_to?(:cloner_class)
61
61
  end
62
62
 
63
63
  def cloner_options
@@ -17,7 +17,7 @@ module Clowne
17
17
 
18
18
  class << self
19
19
  # Duplicate record and remember record <-> clone relationship in operation
20
- # Cab be overrided in special adapter
20
+ # Can be overrided in special adapter
21
21
  # +record+:: Instance of record (ActiveRecord or Sequel)
22
22
  def dup_record(record)
23
23
  record.dup.tap do |clone|
@@ -27,7 +27,7 @@ module Clowne
27
27
  end
28
28
 
29
29
  # Operation class which using for cloning
30
- # Cab be overrided in special adapter
30
+ # Can be overrided in special adapter
31
31
  def operation_class
32
32
  Clowne::Utils::Operation
33
33
  end
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "clowne/ext/yield_self_then"
4
-
5
- using Clowne::Ext::YieldSelfThen
6
-
7
3
  module Clowne
8
4
  module Adapters # :nodoc: all
9
5
  class Sequel
@@ -13,7 +13,7 @@ module Clowne
13
13
  SEQUEL_2_CLONER = {
14
14
  one_to_one: OneToOne,
15
15
  one_to_many: OneToMany,
16
- many_to_many: ManyToMany,
16
+ many_to_many: ManyToMany
17
17
  }.freeze
18
18
 
19
19
  # Returns an association cloner class for reflection
@@ -6,7 +6,6 @@ module Clowne
6
6
  module Resolvers
7
7
  class Association
8
8
  class << self
9
- # rubocop: disable Metrics/ParameterLists
10
9
  def call(source, record, declaration, adapter:, params:, **_options)
11
10
  with_clonable(source, record, declaration) do
12
11
  reflection = source.class.association_reflections[declaration.name.to_sym]
data/lib/clowne/cloner.rb CHANGED
@@ -8,6 +8,7 @@ require "clowne/utils/operation"
8
8
 
9
9
  module Clowne # :nodoc: all
10
10
  class UnprocessableSourceError < StandardError; end
11
+
11
12
  class ConfigurationError < StandardError; end
12
13
 
13
14
  class Cloner
@@ -43,7 +44,6 @@ module Clowne # :nodoc: all
43
44
  @traits[name].extend_with(block)
44
45
  end
45
46
 
46
- # rubocop: disable Metrics/AbcSize, Metrics/MethodLength
47
47
  def call(object, **options, &block)
48
48
  raise(UnprocessableSourceError, "Nil is not cloneable object") if object.nil?
49
49
 
@@ -17,7 +17,7 @@ module Clowne
17
17
  @compiled = compile
18
18
  end
19
19
 
20
- alias declarations compiled
20
+ alias_method :declarations, :compiled
21
21
 
22
22
  def dup
23
23
  self.class.new.tap do |duped|
@@ -8,7 +8,7 @@ module Clowne
8
8
  module_function
9
9
 
10
10
  def add(id, declaration = nil, &block)
11
- declaration = block if block_given?
11
+ declaration = block if block
12
12
 
13
13
  if declaration.is_a?(Class)
14
14
  DSL.send(:define_method, id) do |*args, **hargs, &inner_block|
@@ -4,7 +4,7 @@ module Clowne
4
4
  module Ext
5
5
  module RecordKey # :nodoc: all
6
6
  def key(record)
7
- id = record.respond_to?(:id) && record.id ? record.id : record.__id__
7
+ id = (record.respond_to?(:id) && record.id) ? record.id : record.__id__
8
8
  [record.class.name, id].join("#")
9
9
  end
10
10
  end
@@ -5,9 +5,10 @@ module Clowne
5
5
  module AfterClone # :nodoc: all
6
6
  def self.call(source, record, declaration, params:, **_options)
7
7
  operation = Clowne::Utils::Operation.current
8
+ params ||= {}
8
9
  operation.add_after_clone(
9
10
  proc do
10
- declaration.block.call(source, record, params)
11
+ declaration.block.call(source, record, **params.merge(mapper: operation.mapper))
11
12
  end
12
13
  )
13
14
  record
@@ -3,7 +3,6 @@
3
3
  module Clowne
4
4
  class Resolvers
5
5
  module InitAs # :nodoc: all
6
- # rubocop: disable Metrics/ParameterLists
7
6
  def self.call(source, _record, declaration, params:, adapter:, **_options)
8
7
  adapter.init_record(declaration.block.call(source, **params))
9
8
  end
@@ -20,7 +20,6 @@ module Clowne
20
20
  extract_options! options
21
21
  end
22
22
 
23
- # rubocop: disable Metrics/AbcSize
24
23
  def match(expected, _actual)
25
24
  @actual = plan.declarations
26
25
  .find { |key, decl| key == :association && decl.name == expected }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Clowne
4
- VERSION = "1.3.0"
4
+ VERSION = "1.5.0"
5
5
  end
data/lib/clowne.rb CHANGED
@@ -9,11 +9,10 @@ require "clowne/adapters/base"
9
9
  # Declarative models cloning
10
10
  module Clowne
11
11
  # List of built-in adapters
12
- # rubocop:disable Layout/AlignHash
13
12
  ADAPTERS = {
14
- base: "Base",
13
+ base: "Base",
15
14
  active_record: "ActiveRecord",
16
- sequel: "Sequel",
15
+ sequel: "Sequel"
17
16
  }.freeze
18
17
  # rubocop:enable Layout/AlignHash
19
18
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clowne
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  - Sverchkov Nikolay
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-05-12 00:00:00.000000000 Z
12
+ date: 2023-08-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -73,62 +73,6 @@ dependencies:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '5'
76
- - !ruby/object:Gem::Dependency
77
- name: rubocop
78
- requirement: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 0.75.0
83
- type: :development
84
- prerelease: false
85
- version_requirements: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.75.0
90
- - !ruby/object:Gem::Dependency
91
- name: rubocop-md
92
- requirement: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.3.0
97
- type: :development
98
- prerelease: false
99
- version_requirements: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 0.3.0
104
- - !ruby/object:Gem::Dependency
105
- name: rubocop-rspec
106
- requirement: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 1.36.0
111
- type: :development
112
- prerelease: false
113
- version_requirements: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: 1.36.0
118
- - !ruby/object:Gem::Dependency
119
- name: standard
120
- requirement: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: 0.1.5
125
- type: :development
126
- prerelease: false
127
- version_requirements: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 0.1.5
132
76
  description: A flexible gem for cloning your models.
133
77
  email:
134
78
  - palkan@evilmartians.com
@@ -137,55 +81,9 @@ executables: []
137
81
  extensions: []
138
82
  extra_rdoc_files: []
139
83
  files:
140
- - ".codeclimate.yml"
141
- - ".gitattributes"
142
- - ".gitignore"
143
- - ".rspec"
144
- - ".rubocop.yml"
145
- - ".rufo"
146
- - ".travis.yml"
147
84
  - CHANGELOG.md
148
- - Gemfile
149
85
  - LICENSE.txt
150
86
  - README.md
151
- - Rakefile
152
- - bin/console
153
- - bin/setup
154
- - clowne.gemspec
155
- - docs/.nojekyll
156
- - docs/.rubocop.yml
157
- - docs/CNAME
158
- - docs/README.md
159
- - docs/_sidebar.md
160
- - docs/active_record.md
161
- - docs/after_clone.md
162
- - docs/after_persist.md
163
- - docs/architecture.md
164
- - docs/assets/docsify.min.js
165
- - docs/assets/prism-ruby.min.js
166
- - docs/assets/styles.css
167
- - docs/assets/vue.css
168
- - docs/clone_mapper.md
169
- - docs/customization.md
170
- - docs/exclude_association.md
171
- - docs/finalize.md
172
- - docs/from_v02_to_v1.md
173
- - docs/getting_started.md
174
- - docs/implicit_cloner.md
175
- - docs/include_association.md
176
- - docs/index.html
177
- - docs/init_as.md
178
- - docs/inline_configuration.md
179
- - docs/nullify.md
180
- - docs/operation.md
181
- - docs/parameters.md
182
- - docs/sequel.md
183
- - docs/supported_adapters.md
184
- - docs/testing.md
185
- - docs/traits.md
186
- - gemfiles/activerecord42.gemfile
187
- - gemfiles/jruby.gemfile
188
- - gemfiles/railsmaster.gemfile
189
87
  - lib/clowne.rb
190
88
  - lib/clowne/adapters/active_record.rb
191
89
  - lib/clowne/adapters/active_record/associations.rb
@@ -229,7 +127,6 @@ files:
229
127
  - lib/clowne/ext/orm_ext.rb
230
128
  - lib/clowne/ext/record_key.rb
231
129
  - lib/clowne/ext/string_constantize.rb
232
- - lib/clowne/ext/yield_self_then.rb
233
130
  - lib/clowne/planner.rb
234
131
  - lib/clowne/resolvers/after_clone.rb
235
132
  - lib/clowne/resolvers/after_persist.rb
@@ -255,7 +152,7 @@ metadata:
255
152
  documentation_uri: https://clowne.evilmartians.io/
256
153
  homepage_uri: https://clowne.evilmartians.io/
257
154
  source_code_uri: http://github.com/clowne-rb/clowne
258
- post_install_message:
155
+ post_install_message:
259
156
  rdoc_options: []
260
157
  require_paths:
261
158
  - lib
@@ -263,15 +160,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
263
160
  requirements:
264
161
  - - ">="
265
162
  - !ruby/object:Gem::Version
266
- version: '0'
163
+ version: 2.7.0
267
164
  required_rubygems_version: !ruby/object:Gem::Requirement
268
165
  requirements:
269
166
  - - ">="
270
167
  - !ruby/object:Gem::Version
271
168
  version: '0'
272
169
  requirements: []
273
- rubygems_version: 3.0.3
274
- signing_key:
170
+ rubygems_version: 3.4.8
171
+ signing_key:
275
172
  specification_version: 4
276
173
  summary: A flexible gem for cloning your models
277
174
  test_files: []
data/.codeclimate.yml DELETED
@@ -1,7 +0,0 @@
1
- version: "2"
2
- checks:
3
- method-complexity:
4
- enabled: false
5
- exclude_patterns:
6
- - "docs/"
7
- - "spec/"
data/.gitattributes DELETED
@@ -1 +0,0 @@
1
- docs/**/* linguist-vendored
data/.gitignore DELETED
@@ -1,16 +0,0 @@
1
- .rspec_status
2
- rubocop.html
3
- /coverage/
4
- /.bundle/
5
- /.yardoc
6
- /Gemfile.lock
7
- /_yardoc/
8
- /coverage/
9
- /doc/
10
- /pkg/
11
- /spec/reports/
12
- /tmp/
13
- *.gem
14
- gemfiles/*.lock
15
- Gemfile.local
16
- /docs/web/build/
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --require spec_helper
2
- --format documentation
3
- --color
data/.rubocop.yml DELETED
@@ -1,28 +0,0 @@
1
- require:
2
- # add after moving docs to another tool
3
- - 'standard/cop/semantic_blocks'
4
- - 'rubocop-md'
5
-
6
- inherit_gem:
7
- standard: config/base.yml
8
-
9
- AllCops:
10
- Exclude:
11
- - 'bin/**/*'
12
- - 'tmp/**/*'
13
- - 'vendor/**/*'
14
- - 'gemfiles/vendor/**/*'
15
- - 'clowne.gemspec'
16
- DisplayCopNames: true
17
- TargetRubyVersion: 2.5
18
-
19
- Markdown:
20
- WarnInvalid: true
21
-
22
- Standard/SemanticBlocks:
23
- Enabled: false
24
-
25
- Lint/Void:
26
- Exclude:
27
- - 'docs/README.md'
28
- - 'README.md'
data/.rufo DELETED
@@ -1,3 +0,0 @@
1
- trailing_commas :never
2
- spaces_inside_hash_brace :always
3
- spaces_after_comma :one
data/.travis.yml DELETED
@@ -1,45 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- cache: bundler
4
-
5
- notifications:
6
- email: false
7
-
8
- before_install:
9
- - gem install bundler
10
-
11
- before_script:
12
- # Only generate coverage report for the specified job
13
- - if [ "$CC_REPORT" == "true" ]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
14
- - if [ "$CC_REPORT" == "true" ]; then chmod +x ./cc-test-reporter; fi
15
- - if [ "$CC_REPORT" == "true" ]; then ./cc-test-reporter before-build; fi
16
- script:
17
- - bundle exec rake
18
- - if [ "$CC_REPORT" == "true" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
19
-
20
- matrix:
21
- fast_finish: true
22
- include:
23
- - rvm: ruby-head
24
- gemfile: gemfiles/railsmaster.gemfile
25
- - rvm: jruby-9.2.8.0
26
- gemfile: gemfiles/jruby.gemfile
27
- - rvm: 3.0
28
- gemfile: Gemfile
29
- - rvm: 2.7
30
- gemfile: Gemfile
31
- - rvm: 2.6.5
32
- gemfile: Gemfile
33
- - rvm: 2.5.7
34
- gemfile: Gemfile
35
- - rvm: 2.4.9
36
- gemfile: gemfiles/activerecord42.gemfile
37
- - rvm: truffleruby-head
38
- gemfile: Gemfile
39
- allow_failures:
40
- - rvm: ruby-head
41
- gemfile: gemfiles/railsmaster.gemfile
42
- - rvm: jruby-9.2.8.0
43
- gemfile: gemfiles/jruby.gemfile
44
- - rvm: truffleruby-head
45
- gemfile: Gemfile
data/Gemfile DELETED
@@ -1,20 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in clowne.gemspec
4
- gemspec
5
-
6
- gem "pry-byebug", platform: :mri
7
-
8
- gem "sqlite3", "~> 1.4.1", platform: :ruby
9
- gem "activerecord-jdbcsqlite3-adapter", "~> 50.0", platform: :jruby
10
- gem "jdbc-sqlite3", platform: :jruby
11
-
12
- gem "activerecord", ">= 6.0", "< 6.2.0"
13
- gem "sequel", ">= 5.0"
14
- gem "simplecov"
15
-
16
- local_gemfile = "Gemfile.local"
17
-
18
- if File.exist?(local_gemfile)
19
- eval(File.read(local_gemfile)) # rubocop:disable Security/Eval
20
- end
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "rubocop/rake_task"
4
-
5
- RSpec::Core::RakeTask.new(:spec)
6
- RuboCop::RakeTask.new
7
-
8
- task default: [:rubocop, :spec]
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "clowne"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/clowne.gemspec DELETED
@@ -1,36 +0,0 @@
1
- lib = File.expand_path('lib', __dir__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'clowne/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'clowne'
7
- spec.version = Clowne::VERSION
8
- spec.authors = ['Vladimir Dementyev', 'Sverchkov Nikolay']
9
- spec.email = ['palkan@evilmartians.com', 'ssnikolay@gmail.com']
10
-
11
- spec.summary = 'A flexible gem for cloning your models'
12
- spec.description = 'A flexible gem for cloning your models.'
13
- spec.homepage = 'https://github.com/clowne-rb/clowne'
14
- spec.license = 'MIT'
15
-
16
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
- f.match(%r{^(test|spec|features)/})
18
- end
19
- spec.metadata = {
20
- "bug_tracker_uri" => "http://github.com/clowne-rb/clowne/issues",
21
- "changelog_uri" => "https://github.com/clowne-rb/clowne/blob/master/CHANGELOG.md",
22
- "documentation_uri" => "https://clowne.evilmartians.io/",
23
- "homepage_uri" => "https://clowne.evilmartians.io/",
24
- "source_code_uri" => "http://github.com/clowne-rb/clowne"
25
- }
26
- spec.require_paths = ['lib']
27
-
28
- spec.add_development_dependency 'bundler', '~> 2.0'
29
- spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
30
- spec.add_development_dependency 'rspec', '~> 3.0'
31
- spec.add_development_dependency 'factory_bot', '~> 5'
32
- spec.add_development_dependency 'rubocop', '~> 0.75.0'
33
- spec.add_development_dependency 'rubocop-md', '~> 0.3.0'
34
- spec.add_development_dependency 'rubocop-rspec', '~> 1.36.0'
35
- spec.add_development_dependency 'standard', '~> 0.1.5'
36
- end
data/docs/.nojekyll DELETED
File without changes