niconize 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: c30bc55b82d019579de6222b0cfe8dd765dc4846
4
- data.tar.gz: 7222b3d524336a5d48a8a0b38f2f35175d366e71
3
+ metadata.gz: f6330930034913e9083f8f61d6b8c4a4120f0440
4
+ data.tar.gz: 5509c25d2af23b21233eb8ef3b01a150c83e5266
5
5
  SHA512:
6
- metadata.gz: 2f64d7380b8c570f23b04ad6dcbbb3dc96e5ca74885a7ed9353cf666bc95530e481f81d8f1cec1b03283fb2707948cc92bca7cdb4e6fd1d3e50d47dab0ea39c4
7
- data.tar.gz: 829f2bbf40444310121276d2f8cb6b457c8db5caf215830cad5894efae1357b5ba0fe76a415ae97f6ded340bcdd10416ee421c3546f12a5cabaac83e1990a3a7
6
+ metadata.gz: 1ab920b4a8dd7ffde15466cdd9a073154aa9ab347006e8bde31c3ff66289d15689165446a77c54bb560527c6199323ccfbced6e0dfd6a9def1cd94d99a82e700
7
+ data.tar.gz: 66d54c933abe819485473a56bb5bc9bcceae0afd2c60315ff3afeaef34adcc980fa2e1af65df2a0ba470500fff21b511744cd833908fed289b1f041291951082
data/README.md CHANGED
@@ -1,29 +1,12 @@
1
1
  # Niconize
2
2
 
3
- TODO: Write a gem description
3
+ Wrapper of mechanize for [http://www.nicovideo.jp](http://www.nicovideo.jp)
4
4
 
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'niconize'
5
+ ## Feature
10
6
 
11
- And then execute:
7
+ - Login to nicovideo
8
+ - Timeshift reserve a niconico live
12
9
 
13
- $ bundle
14
-
15
- Or install it yourself as:
10
+ ## Installation
16
11
 
17
12
  $ gem install niconize
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
- ## Contributing
24
-
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
@@ -11,6 +11,7 @@ class Niconize
11
11
  login unless @logined
12
12
  response = @agent.get("http://live.nicovideo.jp/watch/#{lv}")
13
13
 
14
+ raise TimeshiftError, 'This nicolive is already reserved' if response.search('a.watching_reservation_reserved')
14
15
  response.search('a.watching_reservation')[0]['onclick']
15
16
  end
16
17
 
@@ -24,7 +25,7 @@ class Niconize
24
25
  'token' => token
25
26
  }
26
27
  response = @agent.get(URL[:reserve], query)
27
- raise UlckParseError, 'It is the limit of the number of your reservation' unless response.at('div.reserve')
28
+ raise TimeshiftError, 'It is the limit of the number of your reservation' unless response.at('div.reserve')
28
29
  response.at('div.reserve').inner_html.scan(/ulck_[0-9]+/)[0]
29
30
  end
30
31
 
@@ -42,5 +43,5 @@ class Niconize
42
43
  response = @agent.post(URL[:reserve], data)
43
44
  end
44
45
 
45
- class UlckParseError < StandardError; end
46
+ class TimeshiftError < StandardError; end
46
47
  end
@@ -1,3 +1,3 @@
1
1
  class Niconize
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/niconize.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["neoen.gsn@gmail.com"]
11
11
  spec.description = %q{wrapper of mechanize for nicovideo}
12
12
  spec.summary = spec.description
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/tsuwatch/niconize"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: niconize
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
  - Tomohiro Suwa(tsuwatch)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-31 00:00:00.000000000 Z
11
+ date: 2013-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize
@@ -68,7 +68,7 @@ files:
68
68
  - lib/niconize/reserve.rb
69
69
  - lib/niconize/version.rb
70
70
  - niconize.gemspec
71
- homepage: ''
71
+ homepage: https://github.com/tsuwatch/niconize
72
72
  licenses:
73
73
  - MIT
74
74
  metadata: {}