hiroshimarb 0.2.5 → 0.2.6

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: 461d700ecf6452a1318396ff9513acf93a42d5eb
4
- data.tar.gz: f22c28551ae06a304ac193f43ae7afd550b04423
3
+ metadata.gz: b56c6f4a7d2cfdae44a3edc84da4b4587bd1fc04
4
+ data.tar.gz: 1f2e8e535c6453592132b1165d3a1ca8bab31505
5
5
  SHA512:
6
- metadata.gz: ebd2895fe5a004606bd5f4d28c143a9b20cd8dce9b8c1965d5e57b3228651c930f75760b54970b1d3df4757a7204bc4226bf062fb7091003506788b533d1c472
7
- data.tar.gz: 7679479c73edb67b85e70af62b6eb67876b5f72abcc3368b9524822627bb236ddc75e44667a0ab2f9bcd32c6361c252603d774827769d702096a834c0871548f
6
+ metadata.gz: e415e57541438718a232e162fdaf385574669323b843365fae7294471f830a25013b315b389bf179cf9f4138e6c1de784f3bc4162702bc810779992d14772991
7
+ data.tar.gz: 835ef02c4f5d006b22aba4744b1d5b61b160d9eb467f26a78be75685abcb93b0262c581e4059b613b807a3d91717638dfdb2d3491ca7fe622da60c2bedb63a1c
data/.coveralls.yml ADDED
@@ -0,0 +1,2 @@
1
+ service_name: travis-ci
2
+ repo_token: U1GiHJBXZaPt1WabjzR0dyPZG65LlPwMs
data/.travis.yml CHANGED
@@ -1,9 +1,4 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "1.9.2"
4
3
  - "1.9.3"
5
- - jruby-19mode # JRuby in 1.9 mode
6
- - rbx-19mode
7
- script:
8
- - bundle exec rspec spec
9
- - bundle exec cucumber
4
+ - "2.0.0"
data/Gemfile CHANGED
@@ -2,3 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in hiroshimarb.gemspec
4
4
  gemspec
5
+
6
+ gem 'coveralls', require: false
7
+ gem 'json', '~> 1.7.7'
data/README-en.md ADDED
@@ -0,0 +1,73 @@
1
+ # Hiroshima.rb [![Build Status](https://secure.travis-ci.org/hiroshimarb/hiroshimarb-gem.png)](http://travis-ci.org/hiroshimarb/hiroshimarb-gem)
2
+
3
+ This is the Hiroshima.rb gem.
4
+ This is a basic overview.
5
+ I would like to supply information on hiroshimarb commands, but not yet.
6
+
7
+ ## Installation
8
+
9
+ $ gem install hiroshimarb
10
+
11
+ ## Usage
12
+
13
+ ### open command
14
+
15
+ $ hiroshimarb open
16
+
17
+ Show the Hiroshima.rb website in your web browser.
18
+
19
+ `open` has some sub-commands for other websites.
20
+
21
+ <table>
22
+ <tr>
23
+ <td>hiroshimarb</td><td>Hiroshima.rb</td>
24
+ </tr>
25
+ <tr>
26
+ <td>ipad</td><td>A series of iProduct ads dubbed into Hiroshima dialect</td>
27
+ </tr>
28
+ <tr>
29
+ <td>oc-h</td><td>Delicious Hiroshima prefecture! (oc = oshii = delicious)</td>
30
+ </tr>
31
+ <tr>
32
+ <td>city</td><td>Hiroshima city</td>
33
+ </tr>
34
+ <tr>
35
+ <td>pref</td><td>Hiroshima prefecture</td>
36
+ </tr>
37
+ <tr>
38
+ <td>great-h</td><td>Sugoi Hiroshima (sugoi = great)</td>
39
+ </tr>
40
+ </table>
41
+
42
+ ### member command
43
+
44
+ $ hiroshimarb member
45
+
46
+ List the members of Hiroshima.rb.
47
+
48
+ ### info command
49
+
50
+ $ hiroshimarb info
51
+
52
+ Display information about Hiroshima.rb.
53
+
54
+ ### event command
55
+
56
+ $ hiroshimarb event
57
+
58
+ Display info on the next Hiroshima.rb event.
59
+
60
+ ### aa command
61
+
62
+ $ hiroshimarb aa
63
+
64
+ Display ascii art of Hiroshima.rb
65
+
66
+
67
+ ### convert command
68
+
69
+ $ hiroshimarb convert 'いい天気ですね'
70
+
71
+ Convert the string into Hiroshima dialect.
72
+ Hiroshima dialect features often in Yakuza movies.
73
+ The example above will convert "ii tenki desu ne?" (nice weather, isn't it?) into "ii tenki ja no?"
data/README.md CHANGED
@@ -1,4 +1,9 @@
1
- # Hiroshima.rb [![Build Status](https://secure.travis-ci.org/hiroshimarb/hiroshimarb-gem.png)](http://travis-ci.org/hiroshimarb/hiroshimarb-gem)
1
+ # Hiroshima.rb
2
+
3
+ [![Build Status](https://secure.travis-ci.org/hiroshimarb/hiroshimarb-gem.png)](http://travis-ci.org/hiroshimarb/hiroshimarb-gem)
4
+ [![Code Climate](https://codeclimate.com/github/hiroshimarb/hiroshimarb-gem.png)](https://codeclimate.com/github/hiroshimarb/hiroshimarb-gem)
5
+ [![Coverage Status](https://coveralls.io/repos/hiroshimarb/hiroshimarb-gem/badge.png?branch=master)](https://coveralls.io/r/hiroshimarb/hiroshimarb-gem)
6
+
2
7
 
3
8
  この gem は Hiroshima.rb が提供する gem です。
4
9
  基本的にネタです。
@@ -35,6 +40,9 @@
35
40
  <tr>
36
41
  <td>pref</td><td>広島県</td>
37
42
  </tr>
43
+ <tr>
44
+ <td>great-h</td><td>すごい広島</td>
45
+ </tr>
38
46
  </table>
39
47
 
40
48
  ### member コマンド
data/Rakefile CHANGED
@@ -1,2 +1,15 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
+ require "bundler/setup"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new("spec")
7
+
8
+ require 'cucumber'
9
+ require 'cucumber/rake/task'
10
+
11
+ Cucumber::Rake::Task.new(:features) do |t|
12
+ t.cucumber_opts = "features --format pretty"
13
+ end
14
+
15
+ task default: [:spec, :features]
@@ -1 +1,4 @@
1
1
  require 'aruba/cucumber'
2
+
3
+ require 'coveralls'
4
+ Coveralls.wear!
data/hiroshimarb.gemspec CHANGED
@@ -22,4 +22,6 @@ Gem::Specification.new do |gem|
22
22
 
23
23
  gem.add_development_dependency "rspec", "~> 2.11"
24
24
  gem.add_development_dependency "aruba"
25
+ gem.add_development_dependency "rake"
26
+
25
27
  end
@@ -27,6 +27,8 @@ module Hiroshimarb::Commands
27
27
  'http://www.city.hiroshima.lg.jp'
28
28
  when 'pref'
29
29
  'http://www.pref.hiroshima.lg.jp'
30
+ when 'great-h', 'great'
31
+ 'http://great-h.github.io/'
30
32
  end
31
33
  end
32
34
  end
@@ -25,14 +25,18 @@ module Hiroshimarb
25
25
  ENV["resource"] || File.join("resource", "event.yaml")
26
26
  end
27
27
 
28
+ def new_with_hash(hash)
29
+ event = Event.new
30
+ event.title = hash["title"]
31
+ event.url = hash["url"]
32
+ event.date_parse hash["date"]
33
+ event
34
+ end
35
+
28
36
  def load_yaml
29
37
  resource_file = resource_file_path
30
38
  events = YAML.parse_file(resource_file).to_ruby.map do |event_hash|
31
- event = Event.new
32
- event.title = event_hash["title"]
33
- event.url = event_hash["url"]
34
- event.date_parse event_hash["date"]
35
- event
39
+ Event.new_with_hash event_hash
36
40
  end
37
41
  events.sort { |a,b| a.start_datetime <=> b.end_datetime }
38
42
  end
@@ -1,3 +1,3 @@
1
1
  module Hiroshimarb
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
@@ -1,3 +1,4 @@
1
+ require 'spec_helper'
1
2
  require 'hiroshimarb/command'
2
3
 
3
4
  class Sample < Hiroshimarb::Command
@@ -1,4 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
+ require 'spec_helper'
2
3
  require 'hiroshimarb/dsl'
3
4
 
4
5
  module Hiroshimarb
@@ -1,19 +1,20 @@
1
1
  # -*- coding: utf-8 -*-
2
+ require 'spec_helper'
2
3
  require 'hiroshimarb/event'
3
4
 
4
5
  module Hiroshimarb
5
6
  describe Event do
6
7
  describe '.all' do
7
8
  subject { Event.all }
8
- it { should have(2).items }
9
+ it { should have(5).items }
9
10
  end
10
11
 
11
12
  describe '.recent' do
12
13
  subject { Event.recent }
13
- its(:title) { should eq('広島Ruby勉強会 #026') }
14
- it '日付は2012年121日' do
14
+ its(:title) { should eq('広島Ruby勉強会 #031') }
15
+ it '日付は2012年 46日' do
15
16
  date = subject.start_datetime
16
- expect(date.strftime('%Y-%m-%d')).to eq('2012-12-01')
17
+ expect(date.strftime('%Y-%m-%d')).to eq('2013-04-06')
17
18
  end
18
19
  end
19
20
  end
@@ -1,4 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
+ require 'spec_helper'
2
3
  require 'hiroshimarb/information'
3
4
 
4
5
  module Hiroshimarb
@@ -1,4 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
+ require 'spec_helper'
2
3
  require 'hiroshimarb/member'
3
4
 
4
5
  module Hiroshimarb
@@ -1,4 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
+ require 'spec_helper'
2
3
  require 'hiroshimarb'
3
4
  require 'launchy'
4
5
 
@@ -0,0 +1,2 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiroshimarb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomohiko Himura
@@ -24,7 +24,7 @@ authors:
24
24
  autorequire:
25
25
  bindir: bin
26
26
  cert_chain: []
27
- date: 2013-03-29 00:00:00.000000000 Z
27
+ date: 2013-06-08 00:00:00.000000000 Z
28
28
  dependencies:
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: launchy
@@ -68,6 +68,20 @@ dependencies:
68
68
  - - '>='
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rake
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
71
85
  description: provide `hiroshimarb` command. hiroshimarb is Hiroshima.rb. Hiroshima.rb
72
86
  is local community of Ruby in Hiroshima/Japan
73
87
  email:
@@ -77,10 +91,12 @@ executables:
77
91
  extensions: []
78
92
  extra_rdoc_files: []
79
93
  files:
94
+ - .coveralls.yml
80
95
  - .gitignore
81
96
  - .travis.yml
82
97
  - Gemfile
83
98
  - LICENSE
99
+ - README-en.md
84
100
  - README.md
85
101
  - Rakefile
86
102
  - bin/hiroshimarb
@@ -115,6 +131,7 @@ files:
115
131
  - spec/hiroshimarb/information_spec.rb
116
132
  - spec/hiroshimarb/member_spec.rb
117
133
  - spec/hiroshimarb_spec.rb
134
+ - spec/spec_helper.rb
118
135
  homepage: http://github.com/hiroshimarb/hiroshimarb-gem
119
136
  licenses: []
120
137
  metadata: {}
@@ -134,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
151
  version: '0'
135
152
  requirements: []
136
153
  rubyforge_project: github
137
- rubygems_version: 2.0.0
154
+ rubygems_version: 2.0.2
138
155
  signing_key:
139
156
  specification_version: 4
140
157
  summary: provide `hiroshimarb` command. hiroshimarb is Hiroshima.rb
@@ -152,4 +169,4 @@ test_files:
152
169
  - spec/hiroshimarb/information_spec.rb
153
170
  - spec/hiroshimarb/member_spec.rb
154
171
  - spec/hiroshimarb_spec.rb
155
- has_rdoc:
172
+ - spec/spec_helper.rb