hiroshimarb 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.coveralls.yml +2 -0
- data/.travis.yml +1 -6
- data/Gemfile +3 -0
- data/README-en.md +73 -0
- data/README.md +9 -1
- data/Rakefile +13 -0
- data/features/support/env.rb +3 -0
- data/hiroshimarb.gemspec +2 -0
- data/lib/hiroshimarb/commands/open.rb +2 -0
- data/lib/hiroshimarb/event.rb +9 -5
- data/lib/hiroshimarb/version.rb +1 -1
- data/spec/hiroshimarb/command_spec.rb +1 -0
- data/spec/hiroshimarb/dsl_spec.rb +1 -0
- data/spec/hiroshimarb/event_spec.rb +5 -4
- data/spec/hiroshimarb/information_spec.rb +1 -0
- data/spec/hiroshimarb/member_spec.rb +1 -0
- data/spec/hiroshimarb_spec.rb +1 -0
- data/spec/spec_helper.rb +2 -0
- metadata +21 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b56c6f4a7d2cfdae44a3edc84da4b4587bd1fc04
|
4
|
+
data.tar.gz: 1f2e8e535c6453592132b1165d3a1ca8bab31505
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e415e57541438718a232e162fdaf385574669323b843365fae7294471f830a25013b315b389bf179cf9f4138e6c1de784f3bc4162702bc810779992d14772991
|
7
|
+
data.tar.gz: 835ef02c4f5d006b22aba4744b1d5b61b160d9eb467f26a78be75685abcb93b0262c581e4059b613b807a3d91717638dfdb2d3491ca7fe622da60c2bedb63a1c
|
data/.coveralls.yml
ADDED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README-en.md
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# Hiroshima.rb [](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
|
1
|
+
# Hiroshima.rb
|
2
|
+
|
3
|
+
[](http://travis-ci.org/hiroshimarb/hiroshimarb-gem)
|
4
|
+
[](https://codeclimate.com/github/hiroshimarb/hiroshimarb-gem)
|
5
|
+
[](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]
|
data/features/support/env.rb
CHANGED
data/hiroshimarb.gemspec
CHANGED
data/lib/hiroshimarb/event.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/hiroshimarb/version.rb
CHANGED
@@ -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(
|
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勉強会 #
|
14
|
-
it '日付は2012年
|
14
|
+
its(:title) { should eq('広島Ruby勉強会 #031') }
|
15
|
+
it '日付は2012年 4月6日' do
|
15
16
|
date = subject.start_datetime
|
16
|
-
expect(date.strftime('%Y-%m-%d')).to eq('
|
17
|
+
expect(date.strftime('%Y-%m-%d')).to eq('2013-04-06')
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
data/spec/hiroshimarb_spec.rb
CHANGED
data/spec/spec_helper.rb
ADDED
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.
|
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-
|
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.
|
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
|
-
|
172
|
+
- spec/spec_helper.rb
|