totter 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/.gitignore +17 -0
  2. data/.travis.yml +4 -0
  3. data/Contributing.markdown +19 -0
  4. data/Gemfile +22 -0
  5. data/LICENSE +22 -0
  6. data/Rakefile +21 -0
  7. data/Readme.markdown +49 -0
  8. data/lib/totter.rb +26 -0
  9. data/lib/totter/client.rb +152 -0
  10. data/lib/totter/client/choices.rb +74 -0
  11. data/lib/totter/client/decisions.rb +91 -0
  12. data/lib/totter/client/slugs.rb +19 -0
  13. data/lib/totter/client/timelines.rb +16 -0
  14. data/lib/totter/client/users.rb +54 -0
  15. data/lib/totter/client/votes.rb +25 -0
  16. data/lib/totter/error.rb +51 -0
  17. data/lib/totter/version.rb +4 -0
  18. data/test/cassettes/choices/create_choice_upload.yml +85 -0
  19. data/test/cassettes/choices/create_for_image.yml +87 -0
  20. data/test/cassettes/choices/destroy.yml +122 -0
  21. data/test/cassettes/choices/show.yml +42 -0
  22. data/test/cassettes/decisions/analytics.yml +85 -0
  23. data/test/cassettes/decisions/create.yml +44 -0
  24. data/test/cassettes/decisions/destroy.yml +81 -0
  25. data/test/cassettes/decisions/flag.yml +81 -0
  26. data/test/cassettes/decisions/publish.yml +129 -0
  27. data/test/cassettes/decisions/show.yml +84 -0
  28. data/test/cassettes/decisions/unflag.yml +122 -0
  29. data/test/cassettes/slugs/show.yml +75 -0
  30. data/test/cassettes/timelines/global.yml +165 -0
  31. data/test/cassettes/users/following.yml +194 -0
  32. data/test/cassettes/users/me.yml +43 -0
  33. data/test/cassettes/users/user.yml +49 -0
  34. data/test/cassettes/votes/create.yml +96 -0
  35. data/test/support/client_macros.rb +5 -0
  36. data/test/test_helper.rb +24 -0
  37. data/test/totter/client/choices_test.rb +48 -0
  38. data/test/totter/client/decisions_test.rb +77 -0
  39. data/test/totter/client/slugs_test.rb +11 -0
  40. data/test/totter/client/timelines_test.rb +9 -0
  41. data/test/totter/client/users_test.rb +36 -0
  42. data/test/totter/client/votes_test.rb +15 -0
  43. data/test/totter/client_test.rb +31 -0
  44. data/test/totter_test.rb +17 -0
  45. data/totter.gemspec +24 -0
  46. metadata +155 -0
@@ -0,0 +1,17 @@
1
+ require 'test_helper'
2
+
3
+ class TotterTest < Totter::TestCase
4
+ def test_respond_to
5
+ assert Totter.respond_to?(:new, true)
6
+ end
7
+
8
+ def test_new
9
+ assert_equal Totter.new.class, Totter::Client
10
+ end
11
+
12
+ def test_method_missing
13
+ VCR.use_cassette 'users/user' do
14
+ assert_equal 'gotwalt', Totter.user('gotwalt').username
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'totter/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'totter'
8
+ gem.version = Totter::VERSION
9
+ gem.authors = ['Sam Soffes', 'Aaron Gotwalt']
10
+ gem.email = ['sam@soff.es', 'gotwalt@gmail.com']
11
+ gem.description = 'Ruby gem for working with the Seesaw API.'
12
+ gem.summary = gem.description
13
+ gem.homepage = 'https://github.com/seesawco/totter-rb'
14
+ gem.license = 'MIT'
15
+
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ['lib']
20
+
21
+ gem.required_ruby_version = '>= 1.9.2'
22
+ gem.add_dependency 'multi_json', '~> 1.5.0'
23
+ gem.add_dependency 'hashie', '~> 1.2.0'
24
+ end
metadata ADDED
@@ -0,0 +1,155 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: totter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Sam Soffes
9
+ - Aaron Gotwalt
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-02-02 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: multi_json
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 1.5.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: 1.5.0
31
+ - !ruby/object:Gem::Dependency
32
+ name: hashie
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ~>
37
+ - !ruby/object:Gem::Version
38
+ version: 1.2.0
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 1.2.0
47
+ description: Ruby gem for working with the Seesaw API.
48
+ email:
49
+ - sam@soff.es
50
+ - gotwalt@gmail.com
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - .gitignore
56
+ - .travis.yml
57
+ - Contributing.markdown
58
+ - Gemfile
59
+ - LICENSE
60
+ - Rakefile
61
+ - Readme.markdown
62
+ - lib/totter.rb
63
+ - lib/totter/client.rb
64
+ - lib/totter/client/choices.rb
65
+ - lib/totter/client/decisions.rb
66
+ - lib/totter/client/slugs.rb
67
+ - lib/totter/client/timelines.rb
68
+ - lib/totter/client/users.rb
69
+ - lib/totter/client/votes.rb
70
+ - lib/totter/error.rb
71
+ - lib/totter/version.rb
72
+ - test/cassettes/choices/create_choice_upload.yml
73
+ - test/cassettes/choices/create_for_image.yml
74
+ - test/cassettes/choices/destroy.yml
75
+ - test/cassettes/choices/show.yml
76
+ - test/cassettes/decisions/analytics.yml
77
+ - test/cassettes/decisions/create.yml
78
+ - test/cassettes/decisions/destroy.yml
79
+ - test/cassettes/decisions/flag.yml
80
+ - test/cassettes/decisions/publish.yml
81
+ - test/cassettes/decisions/show.yml
82
+ - test/cassettes/decisions/unflag.yml
83
+ - test/cassettes/slugs/show.yml
84
+ - test/cassettes/timelines/global.yml
85
+ - test/cassettes/users/following.yml
86
+ - test/cassettes/users/me.yml
87
+ - test/cassettes/users/user.yml
88
+ - test/cassettes/votes/create.yml
89
+ - test/support/client_macros.rb
90
+ - test/test_helper.rb
91
+ - test/totter/client/choices_test.rb
92
+ - test/totter/client/decisions_test.rb
93
+ - test/totter/client/slugs_test.rb
94
+ - test/totter/client/timelines_test.rb
95
+ - test/totter/client/users_test.rb
96
+ - test/totter/client/votes_test.rb
97
+ - test/totter/client_test.rb
98
+ - test/totter_test.rb
99
+ - totter.gemspec
100
+ homepage: https://github.com/seesawco/totter-rb
101
+ licenses:
102
+ - MIT
103
+ post_install_message:
104
+ rdoc_options: []
105
+ require_paths:
106
+ - lib
107
+ required_ruby_version: !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ! '>='
111
+ - !ruby/object:Gem::Version
112
+ version: 1.9.2
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ segments:
120
+ - 0
121
+ hash: -941973653779003141
122
+ requirements: []
123
+ rubyforge_project:
124
+ rubygems_version: 1.8.23
125
+ signing_key:
126
+ specification_version: 3
127
+ summary: Ruby gem for working with the Seesaw API.
128
+ test_files:
129
+ - test/cassettes/choices/create_choice_upload.yml
130
+ - test/cassettes/choices/create_for_image.yml
131
+ - test/cassettes/choices/destroy.yml
132
+ - test/cassettes/choices/show.yml
133
+ - test/cassettes/decisions/analytics.yml
134
+ - test/cassettes/decisions/create.yml
135
+ - test/cassettes/decisions/destroy.yml
136
+ - test/cassettes/decisions/flag.yml
137
+ - test/cassettes/decisions/publish.yml
138
+ - test/cassettes/decisions/show.yml
139
+ - test/cassettes/decisions/unflag.yml
140
+ - test/cassettes/slugs/show.yml
141
+ - test/cassettes/timelines/global.yml
142
+ - test/cassettes/users/following.yml
143
+ - test/cassettes/users/me.yml
144
+ - test/cassettes/users/user.yml
145
+ - test/cassettes/votes/create.yml
146
+ - test/support/client_macros.rb
147
+ - test/test_helper.rb
148
+ - test/totter/client/choices_test.rb
149
+ - test/totter/client/decisions_test.rb
150
+ - test/totter/client/slugs_test.rb
151
+ - test/totter/client/timelines_test.rb
152
+ - test/totter/client/users_test.rb
153
+ - test/totter/client/votes_test.rb
154
+ - test/totter/client_test.rb
155
+ - test/totter_test.rb