megalopolis 0.0.1 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 1.9.2
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ ## 1.0
2
+
3
+ * 正式リリース
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in megalopolis.gemspec
4
4
  gemspec
5
+ gem "rake"
6
+ gem "rspec"
data/README.md CHANGED
@@ -1,7 +1,13 @@
1
1
  # megalopolis-ruby
2
2
 
3
+ [![Build Status](https://secure.travis-ci.org/oame/megalopolis-ruby.png)](http://travis-ci.org/oame/megalopolis-ruby)
4
+
3
5
  Megalopolis API wrapper for Ruby.
4
6
 
7
+ ## Requirement
8
+
9
+ * Ruby 1.9.x
10
+
5
11
  ## Installation
6
12
 
7
13
  Add this line to your application's Gemfile:
data/Rakefile CHANGED
@@ -1 +1,8 @@
1
+ #!/usr/bin/env rake
1
2
  require "bundler/gem_tasks"
3
+ require "rspec/core/rake_task"
4
+
5
+ RSpec::Core::RakeTask.new('spec')
6
+
7
+ # If you want to make this the default task
8
+ task :default => :spec
@@ -1,22 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
- class Hash2 < Hash
4
- attr_accessor :hash
5
-
6
- def initialize(hash)
7
- super(hash)
8
- @hash = hash
9
- end
10
-
3
+ class Hash
11
4
  def method_missing(action, *args)
12
- return @hash[action.to_s] rescue nil
5
+ return self[action.to_s] rescue nil
13
6
  end
14
7
 
15
- def params() @hash.keys.map{|k|k.to_sym} ; end
16
-
17
- def to_hash
18
- @hash
19
- end
8
+ def params() self.keys.map{|k|k.to_sym} ; end
20
9
  end
21
10
 
22
11
  class Megalopolis
@@ -64,7 +53,7 @@ class Megalopolis
64
53
  end
65
54
 
66
55
  def method_missing(action, *args)
67
- return Hash2.new(@novel[action.to_s]) rescue nil
56
+ return @novel[action.to_s] rescue nil
68
57
  end
69
58
 
70
59
  def params() @novel.keys.map{|k|k.to_sym} ; end
@@ -1,3 +1,3 @@
1
1
  class Megalopolis
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0"
3
3
  end
data/megalopolis.gemspec CHANGED
@@ -16,4 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
+ gem.add_dependency "json" if RUBY_VERSION < "1.9.0"
19
20
  end
data/spec/spec_helper.rb CHANGED
@@ -6,7 +6,7 @@ require "megalopolis"
6
6
  RSpec.configure do |config|
7
7
  config.treat_symbols_as_metadata_keys_with_true_values = true
8
8
  config.run_all_when_everything_filtered = true
9
- config.filter_run :focus
9
+ #config.filter_run :focus
10
10
  config.color_enabled = true
11
11
 
12
12
  # Run specs in random order to surface order dependencies. If you find an
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: megalopolis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: '1.0'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-11 00:00:00.000000000 Z
12
+ date: 2012-10-19 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Megalopolis API wrapper for Ruby
15
15
  email:
@@ -20,6 +20,8 @@ extra_rdoc_files: []
20
20
  files:
21
21
  - .gitignore
22
22
  - .rspec
23
+ - .travis.yml
24
+ - CHANGELOG.md
23
25
  - Gemfile
24
26
  - LICENSE.txt
25
27
  - README.md
@@ -43,12 +45,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
45
  - - ! '>='
44
46
  - !ruby/object:Gem::Version
45
47
  version: '0'
48
+ segments:
49
+ - 0
50
+ hash: 270928971846965143
46
51
  required_rubygems_version: !ruby/object:Gem::Requirement
47
52
  none: false
48
53
  requirements:
49
54
  - - ! '>='
50
55
  - !ruby/object:Gem::Version
51
56
  version: '0'
57
+ segments:
58
+ - 0
59
+ hash: 270928971846965143
52
60
  requirements: []
53
61
  rubyforge_project:
54
62
  rubygems_version: 1.8.24