era_ja 0.4.0 → 0.4.1

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: e63d396e7ea8b3fe5708d1612595222f744a3077
4
- data.tar.gz: 5f157527bcb37159862adbed9adde21956243d9c
3
+ metadata.gz: b0cd9f5424cd1252076c713acee568acc088b793
4
+ data.tar.gz: 504477b56ccb23b8f4701905a65c109fb66220fb
5
5
  SHA512:
6
- metadata.gz: 8c7f9a91eafad1b8a20d245fcbe3e35879b0d429b32c218a496275953d1e56f433f84be7eaf80d64c1ecccf34307069469c9a0b896744b6a9f163fcf866dc8d2
7
- data.tar.gz: e2d0b8aecc5e2f7c46d23ebc37f306e387fb9833ccfbccc6ece0984bb8dc34a2c7f0e57266e4d5c13f8fa6466d8af2425564e401fd45e6b16c3353fd91dd78ee
6
+ metadata.gz: 0237e8246990ae7463dc13995e8532280bcfb74a27fc91e9ec6e29ce58409962b9abd2dafdb7781c9eedef06d84ed8d38231190f338bff770bc262c65d37e306
7
+ data.tar.gz: e8c1ca1ab4fc487152966802bd8526ba4d7976ad91ff1b641b9df248c2e890016fb6184ad7fa622f5f904bbe5d639f60f048d441b9ab94b8f48049db974e0ad0
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 2.1
5
+ - 2.2
6
+ script: bundle exec rspec spec
data/Guardfile CHANGED
@@ -5,6 +5,7 @@
5
5
  guard 'rspec', :cmd => 'bundle exec rspec --color --format progress', :all_after_pass => false do
6
6
  watch(%r{^spec/.+_spec\.rb$})
7
7
  watch(%r{^lib/era_ja/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
8
+ watch('lib/era_ja/conversion.rb') { 'spec' }
8
9
  watch('lib/era_ja.rb') { "spec" }
9
10
  watch('spec/spec_helper.rb') { "spec" }
10
11
  end
data/README.ja.md CHANGED
@@ -1,4 +1,4 @@
1
- # EraJa
1
+ # EraJa [![Build Status](https://travis-ci.org/tomiacannondale/era_ja.svg)](https://travis-ci.org/tomiacannondale/era_ja)
2
2
 
3
3
  日本の和暦に変換します。
4
4
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  ### ruby version ###
20
20
 
21
- era_jaはruby2.0.0とruby2.1.x, 2.2.xでテストをしています。(xは現時点での最後のバージョンです)
21
+ [.travis.yml](https://github.com/tomiacannondale/era_ja/blob/master/.travis.yml ) を確認してください。
22
22
 
23
23
  **NOTE** :: era_ja0.4.0からruby1.9.3をサポートしていません。
24
24
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # EraJa
1
+ # EraJa [![Build Status](https://travis-ci.org/tomiacannondale/era_ja.svg)](https://travis-ci.org/tomiacannondale/era_ja)
2
2
 
3
3
  Convert to Japanese era.
4
4
 
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ### ruby version ###
20
20
 
21
- era_ja was run test on ruby 2.0.0 and ruby 2.1.x and ruby 2.2.x .(x is latest version)
21
+ See [.travis.yml](https://github.com/tomiacannondale/era_ja/blob/master/.travis.yml )
22
22
 
23
23
  **NOTE** :: era_ja does not support ruby 1.9.3 since 0.4.0
24
24
 
data/era_ja.gemspec CHANGED
@@ -21,4 +21,5 @@ Gem::Specification.new do |gem|
21
21
  gem.add_development_dependency "guard-rspec", '~> 4.5.0'
22
22
  gem.add_development_dependency 'rb-fsevent', '~> 0.9.4'
23
23
  gem.add_development_dependency 'terminal-notifier-guard', '~> 1.6.4'
24
+ gem.add_development_dependency 'yard', '~> 0.8.7'
24
25
  end
@@ -25,10 +25,7 @@ module EraJa
25
25
  # this argument is same as one element of ERA_NAME_DEFAULTS.
26
26
  # @return [String]
27
27
  def to_era(format = "%o%E.%m.%d", era_names: ERA_NAME_DEFAULTS)
28
- @era_format = format.dup
29
- @era_format.gsub!(/%J/, "%J%")
30
- @era_format.sub!(/%o/i) { |m| m + ' ' }
31
- @era_format.sub!(/%E/) { |m| m + ' ' }
28
+ @era_format = format.gsub(/%J/, "%J%")
32
29
  str_time = strftime(@era_format)
33
30
  if @era_format =~ /%E/
34
31
  if self.to_time < ::Time.mktime(1868,9,8)
@@ -48,7 +45,7 @@ module EraJa
48
45
 
49
46
  private
50
47
  def era_year(year, era, era_names)
51
- strftime(@era_format).sub(/(%J)?%E /) { format_year(year, $1) }.sub(/%o /i) { format_era(era, era_names) }
48
+ strftime(@era_format).sub(/(%J)?%E/) { format_year(year, $1) }.sub(/%o/i) { format_era(era, era_names) }
52
49
  end
53
50
 
54
51
  def format_era(era, era_names)
@@ -1,3 +1,3 @@
1
1
  module EraJa
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: era_ja
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - tomi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-09 00:00:00.000000000 Z
11
+ date: 2015-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.6.4
83
+ - !ruby/object:Gem::Dependency
84
+ name: yard
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.8.7
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.8.7
83
97
  description: Convert to Japanese era.
84
98
  email:
85
99
  - tomiacannondale@gmail.com
@@ -89,6 +103,7 @@ extra_rdoc_files: []
89
103
  files:
90
104
  - ".document"
91
105
  - ".gitignore"
106
+ - ".travis.yml"
92
107
  - ".yardopts"
93
108
  - Gemfile
94
109
  - Guardfile
@@ -133,3 +148,4 @@ test_files:
133
148
  - spec/date_spec.rb
134
149
  - spec/spec_helper.rb
135
150
  - spec/time_spec.rb
151
+ has_rdoc: