npb 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c99600c3f7ef031ab33718cc8f713d8208bfff7
4
- data.tar.gz: 7d60a0105050a6cf3e84f580f8a04845624109da
3
+ metadata.gz: 3388979a0b9bf6e1f3994ed2dce7c14fce522e67
4
+ data.tar.gz: 67e63c38968bc1f805ae36ea10578759546ec0e4
5
5
  SHA512:
6
- metadata.gz: 88a6b37f39b527dd0d1d4dfd4cbbb220251dccdbd5914f0dd6d7624b58121edd2628e15c0d7aae13cc936af93d68ea1ce460f4518045fbfb0eb7f586f468e26a
7
- data.tar.gz: 8294bdcbf66c774b0e8d74a73840a96d82aec4dc7e3bf15b939c10012b9a19cf7bac0bf33e5dd2534f49d115f24a5516321017bf70a2ab81cb9fc138509e7e30
6
+ metadata.gz: e3ccb0b6e93aaa3a54a82bc4947a40e648cf253935f54338835764d2251af1bd60d229bce3aabb08b76d5ea21de7cc2897c9ce3f09c6ca01bf7daab0e552e4f5
7
+ data.tar.gz: 506a6a7a30d12a095e68d723e33d0dd10cb21ff996a9a7b2152fae19e60fe23e29016d8687ba63c03d98a238a5058afa05ef312d70c8cc4cfa78fb3393ad5767
data/.travis.yml CHANGED
@@ -1,3 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.2.2
4
+ script:
5
+ - ruby test/npb/schedule.rb
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Npb
2
2
 
3
+ [![Build Status](https://travis-ci.org/to0526/npb_schedule.svg?branch=master)](https://travis-ci.org/to0526/npb_schedule)
4
+
3
5
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/npb`. To experiment with that code, run `bin/console` for an interactive prompt.
4
6
 
5
7
  TODO: Delete this and the text above, and describe your gem
@@ -23,18 +25,13 @@ Or install it yourself as:
23
25
  ## Usage
24
26
 
25
27
  ```
26
- pry(main)> require 'npb'
27
- pry(main)> schedules = Npb::Schedule.all
28
+ > schedules = Npb::Schedule.all
28
29
  processing 2015-03-23
29
30
  processing 2015-03-30
30
31
  processing 2015-04-06
31
32
  ...
32
- pry(main)> schedules.first
33
- => #<Npb::Schedule:0x007f987a1fafd0
34
- @home="巨人",
35
- @start_at=2015-03-27 18:00:00 +0900,
36
- @studium="東京ドーム",
37
- @visitor="DeNA">
33
+ > schedules.first
34
+ => #<Npb::Schedule:0x007fa61c523d88 @home="巨人", @visitor="DeNA", @home_score=3, @visitor_score=2, @stadium="東京ドーム", @start_at=2015-03-27 18:00:00 +0900>@visitor="DeNA">
38
35
  ```
39
36
 
40
37
  ## Development
data/lib/npb/schedule.rb CHANGED
@@ -5,7 +5,7 @@ require 'active_support/core_ext'
5
5
 
6
6
  module Npb
7
7
  class Schedule
8
- attr_accessor :home, :visitor, :home_score, :visitor_score, :stadium, :start_at
8
+ attr_accessor :home_team, :visitor_team, :home_score, :visitor_score, :stadium, :start_at
9
9
 
10
10
  class << self
11
11
  def all
@@ -17,8 +17,8 @@ module Npb
17
17
  @time = source.css('td.pl7')[2].text.split[0]
18
18
  @score = source.css('td.ct')[0].text
19
19
  arr << new(
20
- home: source.css('td.pl7')[0].text,
21
- visitor: source.css('td.pl7')[1].text,
20
+ home_team: source.css('td.pl7')[0].text,
21
+ visitor_team: source.css('td.pl7')[1].text,
22
22
  home_score: home_score,
23
23
  visitor_score: visitor_score,
24
24
  stadium: source.css('td.pl7')[2].text.split[1],
@@ -72,9 +72,9 @@ module Npb
72
72
  end
73
73
  end
74
74
 
75
- def initialize(home: nil, visitor: nil, home_score: nil, visitor_score: nil, stadium: nil, start_at: nil)
76
- @home = home
77
- @visitor = visitor
75
+ def initialize(home_team: nil, visitor_team: nil, home_score: nil, visitor_score: nil, stadium: nil, start_at: nil)
76
+ @home_team = home_team
77
+ @visitor_team = visitor_team
78
78
  @home_score = home_score
79
79
  @visitor_score = visitor_score
80
80
  @stadium = stadium
data/lib/npb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Npb
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/npb-0.1.3.gem ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: npb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ohtsuka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-19 00:00:00.000000000 Z
11
+ date: 2015-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -83,7 +83,7 @@ files:
83
83
  - lib/npb.rb
84
84
  - lib/npb/schedule.rb
85
85
  - lib/npb/version.rb
86
- - npb-0.1.2.gem
86
+ - npb-0.1.3.gem
87
87
  - npb.gemspec
88
88
  homepage: https://github.com/to0526/npb_schedule
89
89
  licenses: []
data/npb-0.1.2.gem DELETED
Binary file