declarative-builder 0.1.0 → 0.2.0

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
- SHA1:
3
- metadata.gz: 8a7a21a5da3c82bf9edcbfc53a0b493e3c886ad0
4
- data.tar.gz: 62bb129cb86b262e81792e59bb83ec841ec8df7e
2
+ SHA256:
3
+ metadata.gz: 3d962d01fcbf1a78ac25a316bc63d29d15d82ece5016d035e8c795df5534fe25
4
+ data.tar.gz: def4602a589f3d1cc41adfc2e86017326adacd002632344ca765f82c48403401
5
5
  SHA512:
6
- metadata.gz: 574cc0bb1eb623eb61c57b84d156470e400f864f4fc840a1c391826191399f4716a136c4e84de11f666c63397d8217447360efe1d5198c4202e1a5dd69b11e57
7
- data.tar.gz: 67a36117a847c5069ac2131eadcb75e9a1116ae1e59a486df79917934dcbbe945b4af59bc8f32b348c9451fd0ee5b0212ed24cd7ecb1d2c869a85b75a6a59f8d
6
+ metadata.gz: cc7b16845cf8d06f461da42485f5a7a3430b1e23f700ec2b867944b8b0afd53db1884dba57eaddeedd3ee486c675343e2b0afba0120ef74db3282e5461a7a8b0
7
+ data.tar.gz: 1ae0db9f2bac29bb563ff042f86bc2109a09c11b408ee1d1cdd6e76ab051126567962a8fa4f060d3417fb1daa00c6d39a3e5e13227783a41ecc1d3769747e0d6
@@ -0,0 +1,17 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
9
+ ruby: [2.5, 2.6, 2.7, '3.0', head, jruby, jruby-head]
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: ${{ matrix.ruby }}
16
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
17
+ - run: bundle exec rake
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.2.0
2
+
3
+ * Replace `Declarative::Option` with `Trailblazer::Option` for ruby-3 support.
4
+
1
5
  # 0.1.0
2
6
 
3
7
  * Introduce `Declarative::Builder` as a replacement for `Uber::Builder`.
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Declarative::Builder::VERSION
17
17
 
18
- gem.add_dependency "declarative-option", "< 0.2.0"
18
+ gem.add_dependency "trailblazer-option", "~> 0.1.0"
19
19
 
20
20
  gem.add_development_dependency "rake"
21
21
  gem.add_development_dependency "minitest"
@@ -1,4 +1,4 @@
1
- require "declarative/option"
1
+ require "trailblazer/option"
2
2
 
3
3
  module Declarative
4
4
  module Builder
@@ -8,16 +8,16 @@ module Declarative
8
8
  end
9
9
 
10
10
  class Builders < Array
11
- def call(context, *args)
11
+ def call(context, *args, **options)
12
12
  each do |block|
13
- klass = block.(context, *args) and return klass # Declarative::Option#call()
13
+ klass = block.(*args, exec_context: context, keyword_arguments: options) and return klass # Trailblazer::Option#call()
14
14
  end
15
15
 
16
16
  context
17
17
  end
18
18
 
19
19
  def <<(proc)
20
- super Declarative::Option( proc, instance_exec: true ) # lambdas are always instance_exec'ed.
20
+ super Trailblazer::Option( proc )
21
21
  end
22
22
  end
23
23
 
@@ -33,8 +33,8 @@ module Declarative
33
33
 
34
34
  module Build
35
35
  # Call this from your class to compute the concrete target class.
36
- def build!(context, *args)
37
- builders.(context, *args)
36
+ def build!(context, *args, **options)
37
+ builders.(context, *args, **options)
38
38
  end
39
39
  end
40
40
  end
@@ -1,5 +1,5 @@
1
1
  module Declarative
2
2
  module Builder
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declarative-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-28 00:00:00.000000000 Z
11
+ date: 2021-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: declarative-option
14
+ name: trailblazer-option
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "<"
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: 0.1.0
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: 0.2.0
26
+ version: 0.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -59,8 +59,8 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - ".github/workflows/ci.yml"
62
63
  - ".gitignore"
63
- - ".travis.yml"
64
64
  - CHANGES.md
65
65
  - Gemfile
66
66
  - LICENSE
@@ -76,7 +76,7 @@ homepage: https://github.com/apotonick/declarative-builder
76
76
  licenses:
77
77
  - MIT
78
78
  metadata: {}
79
- post_install_message:
79
+ post_install_message:
80
80
  rdoc_options: []
81
81
  require_paths:
82
82
  - lib
@@ -91,9 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.6.3
96
- signing_key:
94
+ rubygems_version: 3.0.8
95
+ signing_key:
97
96
  specification_version: 4
98
97
  summary: Generic builder pattern.
99
98
  test_files:
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- rvm:
2
- - 1.9.3
3
- - 2.0.0
4
- - 2.1
5
- - 2.2
6
- - 2.3.1
7
- - jruby-19mode
8
- - jruby
9
- before_install:
10
- - gem install bundler