pebbles-tokyu_ruby_kaigi 0.0.1 → 0.0.2

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: 0a0f0bdf579fe154b212ed41ef32df6634c6d823
4
- data.tar.gz: 9709cd7ee8c3e82ddd6974aa6d6efecb43d2293b
3
+ metadata.gz: fd63fd0ebff8179c1f124261595b403bc5180cf3
4
+ data.tar.gz: 044c2a381c2deedd9b8bb7493edfced7e85233da
5
5
  SHA512:
6
- metadata.gz: 921378f4d2f0259fe60de6d8318e128f4625350ab145d1836ef6ac63bc8bb7dae26135c8324b3dc3352c80691ca8f687ce7b2e14e4f02c97a61c931255655737
7
- data.tar.gz: 62c8026c0c30775d4e1364daf7a51e483b42dcd6ffe83ce7654b28632093023c2ed87bd0ad3c135b0035d53f3da515894391dd8a33266137cde280986da5137b
6
+ metadata.gz: b8ca9a2bb2a680f23ef2f7236baa43a89cfb4434d3e50081528c664914155947473fda9cb7f9986a4e8f11dbee338f9c70c1f7496b8eeca2590a7e996e0937b2
7
+ data.tar.gz: 475271d14027919d0cdee70f66e9c1b43a5789b155d65098e78b555bae95b36f2f14818a6b33aa82c3d0e7ae3d85f0408774ceb12bb48e44637041e141de9f9f
@@ -0,0 +1 @@
1
+ repo_token: mee7E5GpOGrhkYaoXkSwNIpKYXMulhq6u
@@ -1,3 +1,21 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.1
3
+ - 2.0
4
+ - 2.1
5
+ - 2.1
6
+ - 2.2
7
+ - ruby-head
8
+ bundler_args: "--jobs=2"
9
+ before_script:
10
+ - export COVERAGE=true
11
+ script: bundle exec rspec
12
+ branches:
13
+ only:
14
+ - master
15
+ notifications:
16
+ email: false
17
+ slack:
18
+ secure: A2NfkamFIfgKSrV3KFMW+vYsCt9H9WgXJf6A4T+aAi8d/2WjeXbl0jB7FYBT8ut1Xgi43TrmoqDqvWSv9ly7yc0qFfIG4dtb8THmUJ+P11UDWPQXt40IFX/zX8ueQs9MA8h1sgtPyvenM7pRpKG+r6ooRHErPcYpx0zCb6JbDhY=
19
+ matrix:
20
+ allow_failures:
21
+ - rvm: ruby-head
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## [v0.0.1] (https://github.com/sue445/pebbles-tokyu_ruby_kaigi/tree/v0.0.1)
4
+ #### 2014/03/02
5
+
6
+
7
+ \* *This changelog was generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/README.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Find target day of TokyuRubyKaigi (http://qwik.jp/tokyurb/)
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/pebbles-tokyu_ruby_kaigi.png)](http://badge.fury.io/rb/pebbles-tokyu_ruby_kaigi)
6
+ [![Build Status](https://travis-ci.org/sue445/pebbles-tokyu_ruby_kaigi.png)](https://travis-ci.org/sue445/pebbles-tokyu_ruby_kaigi)
7
+ [![Coverage Status](https://coveralls.io/repos/sue445/pebbles-tokyu_ruby_kaigi/badge.png)](https://coveralls.io/r/sue445/pebbles-tokyu_ruby_kaigi)
8
+ [![Dependency Status](https://gemnasium.com/sue445/pebbles-tokyu_ruby_kaigi.png)](https://gemnasium.com/sue445/pebbles-tokyu_ruby_kaigi)
9
+ [![Code Climate](https://codeclimate.com/github/sue445/pebbles-tokyu_ruby_kaigi.png)](https://codeclimate.com/github/sue445/pebbles-tokyu_ruby_kaigi)
10
+
5
11
  ## Definition of TokyuRubyKaigi
6
12
 
7
13
  * 29th day a.k.a Meet day (肉の日)
@@ -24,6 +30,12 @@ Or install it yourself as:
24
30
  ## Usage
25
31
 
26
32
  ```sh
33
+ $ tokyu_ruby_kaigi --help
34
+ Commands:
35
+ tokyu_ruby_kaigi help [COMMAND] # Describe available commands or one specific command
36
+ tokyu_ruby_kaigi next # show next target day of TokyuRubyKaigi
37
+ tokyu_ruby_kaigi take LIMIT # show target days of TokyuRubyKaigi (default 10 days)
38
+
27
39
  $ tokyu_ruby_kaigi next
28
40
  2014/03/29(Sat)
29
41
 
@@ -1,9 +1,10 @@
1
1
  require "pebbles/tokyu_ruby_kaigi/version"
2
- require "active_support/core_ext"
3
- require "google_holiday_calendar"
4
2
 
5
3
  module Pebbles
6
4
  module TokyuRubyKaigi
5
+ require "active_support/all"
6
+ require "holiday_japan"
7
+
7
8
  MEET_DAY = 29
8
9
 
9
10
  # find next target day of TokyuRubyKaigi
@@ -20,14 +21,17 @@ module Pebbles
20
21
  meet_date = Date.today.day < MEET_DAY ? next_meet_date(Date.today) : next_meet_date(1.month.past)
21
22
 
22
23
  loop do
23
- tokyu_ruby_kaigi_dates << meet_date if meet_date.saturday? || meet_date.sunday? || holiday?(meet_date)
24
- return tokyu_ruby_kaigi_dates if tokyu_ruby_kaigi_dates.length == limit
24
+ tokyu_ruby_kaigi_dates << meet_date if meet_date.saturday? || meet_date.sunday? || meet_date.national_holiday?
25
+ break if tokyu_ruby_kaigi_dates.length == limit
25
26
 
26
27
  meet_date = next_meet_date(meet_date + 1.month)
27
28
  end
29
+
30
+ tokyu_ruby_kaigi_dates
28
31
  end
29
32
 
30
33
  private
34
+
31
35
  def self.next_meet_date(date)
32
36
  date.change(day: MEET_DAY)
33
37
  rescue ArgumentError
@@ -36,8 +40,5 @@ module Pebbles
36
40
  retry
37
41
  end
38
42
 
39
- def self.holiday?(date)
40
- GoogleHolidayCalendar::Calendar.new(country: "japanese", lang: "ja").holiday?(date)
41
- end
42
43
  end
43
44
  end
@@ -10,7 +10,7 @@ module Pebbles
10
10
  puts "#{date.strftime("%Y/%m/%d(%a)")}"
11
11
  end
12
12
 
13
- desc "take LIMIT", "show target days of TokyuRubyKaigi"
13
+ desc "take LIMIT", "show target days of TokyuRubyKaigi (default 10 days)"
14
14
  def take(limit=10)
15
15
  dates = Pebbles::TokyuRubyKaigi.take(limit)
16
16
  dates.each do |date|
@@ -1,5 +1,5 @@
1
1
  module Pebbles
2
2
  module TokyuRubyKaigi
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -18,13 +18,14 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "activesupport", "~> 4.0.0"
22
- spec.add_dependency "google_holiday_calendar", "~> 0.0.2"
21
+ spec.add_dependency "activesupport", ">= 4.0.0"
22
+ spec.add_dependency "holiday_japan"
23
23
  spec.add_dependency "thor"
24
24
 
25
25
  spec.add_development_dependency "bundler", ">= 1.5"
26
+ spec.add_development_dependency "coveralls"
27
+ spec.add_development_dependency "delorean"
26
28
  spec.add_development_dependency "rake"
27
- spec.add_development_dependency "rspec", "3.0.0.beta1"
29
+ spec.add_development_dependency "rspec", "3.1.0"
28
30
  spec.add_development_dependency "rspec-its"
29
- spec.add_development_dependency "delorean"
30
31
  end
@@ -1,3 +1,8 @@
1
+ if ENV["COVERAGE"]
2
+ require 'coveralls'
3
+ Coveralls.wear!
4
+ end
5
+
1
6
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
7
  require 'pebbles/tokyu_ruby_kaigi'
3
8
 
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebbles-tokyu_ruby_kaigi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-02 00:00:00.000000000 Z
11
+ date: 2015-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.0.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
26
  version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: google_holiday_calendar
28
+ name: holiday_japan
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.2
33
+ version: '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: 0.0.2
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.5'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: coveralls
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,21 +81,21 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: delorean
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 3.0.0.beta1
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 3.0.0.beta1
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rspec-its
98
+ name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,21 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: delorean
112
+ name: rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 3.1.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '='
123
+ - !ruby/object:Gem::Version
124
+ version: 3.1.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec-its
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - ">="
@@ -130,9 +144,11 @@ executables:
130
144
  extensions: []
131
145
  extra_rdoc_files: []
132
146
  files:
147
+ - ".coveralls.yml"
133
148
  - ".gitignore"
134
149
  - ".rspec"
135
150
  - ".travis.yml"
151
+ - CHANGELOG.md
136
152
  - Gemfile
137
153
  - LICENSE.txt
138
154
  - README.md
@@ -164,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
180
  version: '0'
165
181
  requirements: []
166
182
  rubyforge_project:
167
- rubygems_version: 2.2.2
183
+ rubygems_version: 2.4.5
168
184
  signing_key:
169
185
  specification_version: 4
170
186
  summary: Find target day of TokyuRubyKaigi