everyleaf-embulk_helper 0.0.2 → 0.0.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
  SHA1:
3
- metadata.gz: 36c1b41d191cb714c8d3b420d287402632ebb34c
4
- data.tar.gz: 122aa4c29658a038ae0b9d71288c41cf660ce42a
3
+ metadata.gz: 002a2b675c27c3e7562fb6287880bad042c733fb
4
+ data.tar.gz: 076cc77affef91f1e2a9bf927c5cd5a3aae159c7
5
5
  SHA512:
6
- metadata.gz: 90060c26bf3d014428599c451bd29c1810653d85d589979335e818d6c95316267e9a278c18a5db907a5b8e4123e33b43bef82d5173adaf7c8522317ffbb6ebf2
7
- data.tar.gz: 7362b8bc99f5046a4d8e77cf8c840d07c200c402ea236e008658bbfec3abf492c79903021ce36cdae703263404cfc784edb282017b61162338a76c2a3f07f063
6
+ metadata.gz: 2313014ffbee484d6533187d4acc17c470d534fb0be8c25a54490848abbfb0769042f5a7526e4c8db3303e1d22e7c2b964ca5447785ab3ef43cd9f6aa4950548
7
+ data.tar.gz: 2683c2a8b8068b79ba89bcd0dcd6a1af0a4a4fb7480181f0cfd2008d4cde9839a4c3f2bf7b9c3540ad213e9c2fa0d114029f604ab23d45f11cc5ea06d9f5085c
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - jruby-19mode
4
+ env: 'JRUBY_OPTS="-Xcli.debug=true --debug"' # for test coverage
4
5
  addons:
5
6
  code_climate:
6
7
  repo_token:
@@ -1,3 +1,8 @@
1
+ ## 0.0.3 - 2015-08-18
2
+
3
+ * [improve] travis: Initial travis.yml template has allow_failures Embulk 0.6.22 [#3](https://github.com/everyleaf/everyleaf-embulk_helper/pull/3)
4
+ * [improve] gemfiles: Genarates embulk-0.x-latest gemfile [#3](https://github.com/everyleaf/everyleaf-embulk_helper/pull/3)
5
+
1
6
  ## 0.0.2 - 2015-08-11
2
7
 
3
8
  * [fix] Fix gemspec path within generated gemfile template [#2](https://github.com/everyleaf/everyleaf-embulk_helper/pull/2)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- everyleaf-embulk_helper (0.0.2)
4
+ everyleaf-embulk_helper (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -60,7 +60,7 @@ module Everyleaf
60
60
  end
61
61
 
62
62
  def embulk_tags
63
- JSON.parse(open("https://api.github.com/repos/embulk/embulk/tags").read)
63
+ @embulk_tags ||= JSON.parse(open("https://api.github.com/repos/embulk/embulk/tags").read)
64
64
  end
65
65
 
66
66
  def embulk_versions
@@ -51,10 +51,16 @@ gem "embulk", "<%= version %>"
51
51
 
52
52
  Dir[gemfiles_dir.join("embulk-*")].each{|f| File.unlink(f)}
53
53
 
54
- embulk_versions.each do |version|
55
- next if version < min_version
54
+ target_versions.each do |version|
56
55
  create_gemfile(version)
57
56
  end
57
+
58
+ # e.g. embulk-0.6-latest
59
+ target_versions_without_patch.each do |version|
60
+ create_gemfile("~> #{version}", "#{version}-latest")
61
+ end
62
+
63
+ # embulk-latest
58
64
  create_gemfile("> #{min_version}", "latest")
59
65
  end
60
66
 
@@ -72,6 +78,19 @@ gem "embulk", "<%= version %>"
72
78
  def gemfile_template_path
73
79
  root_dir.join(options[:gemfile_template] || DEFAULT_EMBULK_GEMFILE_TEMPLATE)
74
80
  end
81
+
82
+ def target_versions
83
+ embulk_versions.find_all do |version|
84
+ version >= min_version
85
+ end
86
+ end
87
+
88
+ def target_versions_without_patch
89
+ target_versions.map do |version|
90
+ major, minor, _ = version.segments
91
+ Gem::Version.new([major, minor].join("."))
92
+ end.uniq
93
+ end
75
94
  end
76
95
  end
77
96
  end
@@ -48,6 +48,10 @@ gemfile:
48
48
  <% versions.each do |file| -%>
49
49
  - gemfiles/<%= file %>
50
50
  <% end -%>
51
+
52
+ matrix:
53
+ allow_failures:
54
+ - gemfile: gemfiles/embulk-0.6.22
51
55
  YML
52
56
  end
53
57
 
@@ -1,5 +1,5 @@
1
1
  module Everyleaf
2
2
  module EmbulkHelper
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -23,8 +23,8 @@ gem "embulk", "<%= version %>"
23
23
  @task.gemfiles
24
24
  files = Dir["#{@task.root_dir}/gemfiles/embulk-*"]
25
25
 
26
- # all versions + latest version
27
- assert_equal(embulk_versions.length + 1, files.length)
26
+ # all versions + minor versions + latest version
27
+ assert_equal(embulk_versions.length + minor_versions.length + 1, files.length)
28
28
  end
29
29
 
30
30
  def test_0_1_1_with_env
@@ -32,19 +32,24 @@ gem "embulk", "<%= version %>"
32
32
  @task.gemfiles
33
33
  files = Dir["#{@task.root_dir}/gemfiles/embulk-*"]
34
34
 
35
- # all versions + latest version - 0.1.1
36
- assert_equal(4, files.length)
35
+ # 0.1.1 + 0.1.2 + 0.1-latest + 0.2.0 + 0.2-latest + latest version
36
+ assert_equal(6, files.length)
37
37
  ensure
38
38
  ENV.delete("MIN_VERSION")
39
39
  end
40
40
 
41
41
  def test_0_1_1_with_options
42
- opt = options
43
- stub(self).options { opt[:min_vesion] = "0.1.1"; opt }
42
+ stub(@task).options { options.merge(min_version: "0.1.1") }
43
+
44
+ @task.gemfiles
44
45
  files = Dir["#{@task.root_dir}/gemfiles/embulk-*"]
45
46
 
46
- # all versions + latest version - 0.1.1
47
- assert_equal(4, files.length)
47
+ # 0.1.1 + 0.1.2 + 0.1-latest + 0.2.0 + 0.2-latest + latest version
48
+ assert_equal(6, files.length)
49
+ end
50
+
51
+ def minor_versions
52
+ @task.send(:target_versions_without_patch)
48
53
  end
49
54
  end
50
55
 
@@ -123,8 +128,7 @@ gem "embulk", "0.1.2"
123
128
  @task.gemfiles
124
129
  files = Dir["#{@task.root_dir}/gemfiles/embulk-*"]
125
130
 
126
- # each version + latest version
127
- assert_equal(embulk_versions.length + 1, files.length)
131
+ assert_false(files.empty?)
128
132
  end
129
133
 
130
134
  private
metadata CHANGED
@@ -1,98 +1,98 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everyleaf-embulk_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshihara
8
8
  - uu59
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-11 00:00:00.000000000 Z
12
+ date: 2015-08-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
+ name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - ~>
18
+ - - "~>"
18
19
  - !ruby/object:Gem::Version
19
20
  version: '1.7'
20
- name: bundler
21
- prerelease: false
22
21
  type: :development
22
+ prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.7'
28
28
  - !ruby/object:Gem::Dependency
29
+ name: rake
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - ~>
32
+ - - "~>"
32
33
  - !ruby/object:Gem::Version
33
34
  version: '10.0'
34
- name: rake
35
- prerelease: false
36
35
  type: :development
36
+ prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '10.0'
42
42
  - !ruby/object:Gem::Dependency
43
+ name: test-unit
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - '>='
46
+ - - ">="
46
47
  - !ruby/object:Gem::Version
47
48
  version: '0'
48
- name: test-unit
49
- prerelease: false
50
49
  type: :development
50
+ prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
+ name: test-unit-rr
57
58
  requirement: !ruby/object:Gem::Requirement
58
59
  requirements:
59
- - - '>='
60
+ - - ">="
60
61
  - !ruby/object:Gem::Version
61
62
  version: '0'
62
- name: test-unit-rr
63
- prerelease: false
64
63
  type: :development
64
+ prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
+ name: pry
71
72
  requirement: !ruby/object:Gem::Requirement
72
73
  requirements:
73
- - - '>='
74
+ - - ">="
74
75
  - !ruby/object:Gem::Version
75
76
  version: '0'
76
- name: pry
77
- prerelease: false
78
77
  type: :development
78
+ prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
+ name: codeclimate-test-reporter
85
86
  requirement: !ruby/object:Gem::Requirement
86
87
  requirements:
87
- - - '>='
88
+ - - ">="
88
89
  - !ruby/object:Gem::Version
89
90
  version: '0'
90
- name: codeclimate-test-reporter
91
- prerelease: false
92
91
  type: :development
92
+ prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  description: Add some handy helpers for developing Embulk plugins
@@ -103,7 +103,7 @@ executables: []
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
- - .travis.yml
106
+ - ".travis.yml"
107
107
  - CHANGELOG.md
108
108
  - Gemfile
109
109
  - Gemfile.lock
@@ -128,24 +128,24 @@ homepage: https://github.com/everyleaf/everyleaf-embulk_helper
128
128
  licenses:
129
129
  - MIT
130
130
  metadata: {}
131
- post_install_message:
131
+ post_install_message:
132
132
  rdoc_options: []
133
133
  require_paths:
134
134
  - lib
135
135
  required_ruby_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - '>='
142
+ - - ">="
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubyforge_project:
147
- rubygems_version: 2.4.6
148
- signing_key:
146
+ rubyforge_project:
147
+ rubygems_version: 2.2.2
148
+ signing_key:
149
149
  specification_version: 4
150
150
  summary: Add some handy helpers for developing Embulk plugins
151
151
  test_files: