corkboard 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. data/.env.template +1 -0
  2. data/.gitignore +15 -0
  3. data/.rspec.template +2 -0
  4. data/.rvmrc.template +4 -0
  5. data/.wiprc +0 -0
  6. data/.yardopts +1 -0
  7. data/Gemfile +15 -0
  8. data/Gemfile.lock +223 -0
  9. data/app/assets/images/corkboard/.gitkeep +0 -0
  10. data/corkboard.gemspec +41 -0
  11. data/lib/corkboard/version.rb +1 -1
  12. data/script/rails +8 -0
  13. data/spec/controllers/corkboard/application_controller_spec.rb +7 -0
  14. data/spec/controllers/corkboard/authorizations_controller_spec.rb +26 -0
  15. data/spec/controllers/corkboard/board_controller_spec.rb +29 -0
  16. data/spec/controllers/corkboard/posts_controller_spec.rb +7 -0
  17. data/spec/corkboard/client_spec.rb +52 -0
  18. data/spec/corkboard/clients/instagram_spec.rb +30 -0
  19. data/spec/corkboard/engine_spec.rb +11 -0
  20. data/spec/corkboard/provider_spec.rb +28 -0
  21. data/spec/corkboard/providers/instagram_spec.rb +44 -0
  22. data/spec/corkboard/publishers/mock_spec.rb +12 -0
  23. data/spec/corkboard/publishers/pusher_spec.rb +12 -0
  24. data/spec/corkboard/service/config_spec.rb +12 -0
  25. data/spec/corkboard_spec.rb +136 -0
  26. data/spec/dummy/README.rdoc +261 -0
  27. data/spec/dummy/Rakefile +7 -0
  28. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  29. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  30. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  31. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  32. data/spec/dummy/app/mailers/.gitkeep +0 -0
  33. data/spec/dummy/app/models/.gitkeep +0 -0
  34. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  35. data/spec/dummy/config.ru +4 -0
  36. data/spec/dummy/config/application.rb +65 -0
  37. data/spec/dummy/config/boot.rb +10 -0
  38. data/spec/dummy/config/database.yml +25 -0
  39. data/spec/dummy/config/environment.rb +5 -0
  40. data/spec/dummy/config/environments/development.rb +37 -0
  41. data/spec/dummy/config/environments/production.rb +67 -0
  42. data/spec/dummy/config/environments/test.rb +37 -0
  43. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  44. data/spec/dummy/config/initializers/corkboard.rb +45 -0
  45. data/spec/dummy/config/initializers/inflections.rb +15 -0
  46. data/spec/dummy/config/initializers/jasmine.rb +5 -0
  47. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  48. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  49. data/spec/dummy/config/initializers/session_store.rb +8 -0
  50. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  51. data/spec/dummy/config/locales/en.yml +5 -0
  52. data/spec/dummy/config/routes.rb +3 -0
  53. data/spec/dummy/db/.gitkeep +0 -0
  54. data/spec/dummy/db/migrate/20121212222912_create_corkboard_authorizations.corkboard.rb +18 -0
  55. data/spec/dummy/db/schema.rb +31 -0
  56. data/spec/dummy/lib/assets/.gitkeep +0 -0
  57. data/spec/dummy/log/.gitkeep +0 -0
  58. data/spec/dummy/public/404.html +26 -0
  59. data/spec/dummy/public/422.html +26 -0
  60. data/spec/dummy/public/500.html +25 -0
  61. data/spec/dummy/public/favicon.ico +0 -0
  62. data/spec/dummy/script/rails +6 -0
  63. data/spec/helpers/corkboard/application_helper_spec.rb +7 -0
  64. data/spec/javascripts/fixtures/board.html +3 -0
  65. data/spec/javascripts/helpers/jasmine-jquery.js +340 -0
  66. data/spec/javascripts/spec.css +3 -0
  67. data/spec/javascripts/spec.js +5 -0
  68. data/spec/javascripts/spec_helper.js +41 -0
  69. data/spec/javascripts/specs/corkboard/app/board_spec.js +68 -0
  70. data/spec/javascripts/specs/corkboard/base_spec.js +17 -0
  71. data/spec/javascripts/specs/corkboard/lib/publisher_spec.js +101 -0
  72. data/spec/javascripts/specs/corkboard/lib/weighted_randomizer_spec.js +23 -0
  73. data/spec/javascripts/specs/corkboard_spec.js +45 -0
  74. data/spec/javascripts/support/jasmine.yml +75 -0
  75. data/spec/javascripts/support/jasmine_config.rb +1 -0
  76. data/spec/models/corkboard/authorization_spec.rb +7 -0
  77. data/spec/models/corkboard/post_spec.rb +7 -0
  78. data/spec/models/corkboard/subscription_spec.rb +7 -0
  79. data/spec/requests/authorizations_spec.rb +39 -0
  80. data/spec/requests/board_spec.rb +70 -0
  81. data/spec/routing/authorizations_routing_spec.rb +25 -0
  82. data/spec/routing/board_routing_spec.rb +7 -0
  83. data/spec/routing/posts_routing_spec.rb +15 -0
  84. data/spec/spec_helper.rb +51 -0
  85. data/spec/support/helpers/config_helpers.rb +26 -0
  86. data/spec/support/helpers/controller_helpers.rb +12 -0
  87. data/spec/support/helpers/post_helpers.rb +119 -0
  88. data/vendor/assets/javascripts/jquery.masonry-extensions.js +203 -0
  89. data/vendor/assets/javascripts/jquery.masonry.js +499 -0
  90. data/vendor/assets/javascripts/modernizr.js +821 -0
  91. data/vendor/assets/javascripts/pusher.js +48 -0
  92. metadata +176 -11
@@ -0,0 +1 @@
1
+ RVM_GEMSET="ruby-1.9.3@corkboard"
@@ -0,0 +1,15 @@
1
+ /.bundle
2
+ /.env
3
+ /.rvmrc
4
+ /.rspec
5
+ /.yardoc
6
+
7
+ /doc/*
8
+ /log/*.log
9
+ /pkg/*
10
+ /tmp/*
11
+
12
+ /spec/dummy/db/*.sqlite3
13
+ /spec/dummy/log/*.log
14
+ /spec/dummy/tmp/
15
+ /spec/dummy/.sass-cache
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
@@ -0,0 +1,4 @@
1
+ source .env
2
+ export USE_BUNDLER=force
3
+
4
+ rvm use --create --install $RVM_GEMSET
data/.wiprc ADDED
File without changes
@@ -0,0 +1 @@
1
+ --markup markdown --protected --plugin yard-rails lib/**/*.rb - README.md LICENSE
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ # Declare any dependencies that are still in development here instead of in
6
+ # your gemspec. These might include edge Rails or gems from your path or
7
+ # Git. Remember to move these dependencies to your gemspec before releasing
8
+ # your gem to rubygems.org.
9
+
10
+ # used by dummy application:
11
+ gem "jquery-rails"
12
+ gem "capybara-webkit"
13
+ gem "jasminerice",
14
+ :git => 'git://github.com/coreyti/jasminerice.git'
15
+ gem "jasminerice-runner"
@@ -0,0 +1,223 @@
1
+ GIT
2
+ remote: git://github.com/coreyti/jasminerice.git
3
+ revision: 37e379c271cef665d71f54d7dd035687d6377c7d
4
+ specs:
5
+ jasminerice (0.0.8)
6
+ coffee-rails
7
+ haml
8
+
9
+ PATH
10
+ remote: .
11
+ specs:
12
+ corkboard (0.1.1)
13
+ instagram
14
+ jquery-rails
15
+ omniauth
16
+ omniauth-instagram
17
+ omniauth-oauth2
18
+ pusher
19
+ rails (~> 3.2.8)
20
+ redis
21
+ weighted_randomizer
22
+
23
+ GEM
24
+ remote: http://rubygems.org/
25
+ specs:
26
+ actionmailer (3.2.9)
27
+ actionpack (= 3.2.9)
28
+ mail (~> 2.4.4)
29
+ actionpack (3.2.9)
30
+ activemodel (= 3.2.9)
31
+ activesupport (= 3.2.9)
32
+ builder (~> 3.0.0)
33
+ erubis (~> 2.7.0)
34
+ journey (~> 1.0.4)
35
+ rack (~> 1.4.0)
36
+ rack-cache (~> 1.2)
37
+ rack-test (~> 0.6.1)
38
+ sprockets (~> 2.2.1)
39
+ activemodel (3.2.9)
40
+ activesupport (= 3.2.9)
41
+ builder (~> 3.0.0)
42
+ activerecord (3.2.9)
43
+ activemodel (= 3.2.9)
44
+ activesupport (= 3.2.9)
45
+ arel (~> 3.0.2)
46
+ tzinfo (~> 0.3.29)
47
+ activeresource (3.2.9)
48
+ activemodel (= 3.2.9)
49
+ activesupport (= 3.2.9)
50
+ activesupport (3.2.9)
51
+ i18n (~> 0.6)
52
+ multi_json (~> 1.0)
53
+ addressable (2.3.2)
54
+ arel (3.0.2)
55
+ builder (3.0.4)
56
+ capybara (1.1.3)
57
+ mime-types (>= 1.16)
58
+ nokogiri (>= 1.3.3)
59
+ rack (>= 1.0.0)
60
+ rack-test (>= 0.5.4)
61
+ selenium-webdriver (~> 2.0)
62
+ xpath (~> 0.1.4)
63
+ capybara-webkit (0.13.0)
64
+ capybara (>= 1.0.0, < 1.2)
65
+ json
66
+ childprocess (0.3.6)
67
+ ffi (~> 1.0, >= 1.0.6)
68
+ coffee-rails (3.2.2)
69
+ coffee-script (>= 2.2.0)
70
+ railties (~> 3.2.0)
71
+ coffee-script (2.2.0)
72
+ coffee-script-source
73
+ execjs
74
+ coffee-script-source (1.4.0)
75
+ diff-lcs (1.1.3)
76
+ erubis (2.7.0)
77
+ execjs (1.4.0)
78
+ multi_json (~> 1.0)
79
+ faraday (0.8.4)
80
+ multipart-post (~> 1.1)
81
+ faraday_middleware (0.9.0)
82
+ faraday (>= 0.7.4, < 0.9)
83
+ ffaker (1.15.0)
84
+ ffi (1.1.5)
85
+ haml (3.1.7)
86
+ hashie (1.2.0)
87
+ hike (1.2.1)
88
+ httpauth (0.2.0)
89
+ i18n (0.6.1)
90
+ instagram (0.8.5)
91
+ faraday (>= 0.7, < 0.9)
92
+ faraday_middleware (~> 0.8)
93
+ hashie (>= 0.4.0)
94
+ multi_json (~> 1.0, >= 1.0.3)
95
+ jasmine (1.3.1)
96
+ jasmine-core (~> 1.3.1)
97
+ rack (~> 1.0)
98
+ rspec (>= 1.3.1)
99
+ selenium-webdriver (>= 0.1.3)
100
+ jasmine-core (1.3.1)
101
+ jasminerice-runner (0.0.3)
102
+ capybara
103
+ journey (1.0.4)
104
+ jquery-rails (2.1.4)
105
+ railties (>= 3.0, < 5.0)
106
+ thor (>= 0.14, < 2.0)
107
+ json (1.7.5)
108
+ jwt (0.1.5)
109
+ multi_json (>= 1.0)
110
+ libwebsocket (0.1.5)
111
+ addressable
112
+ mail (2.4.4)
113
+ i18n (>= 0.4.0)
114
+ mime-types (~> 1.16)
115
+ treetop (~> 1.4.8)
116
+ mime-types (1.19)
117
+ mock_redis (0.6.2)
118
+ multi_json (1.5.0)
119
+ multipart-post (1.1.5)
120
+ nokogiri (1.5.5)
121
+ oauth2 (0.8.0)
122
+ faraday (~> 0.8)
123
+ httpauth (~> 0.1)
124
+ jwt (~> 0.1.4)
125
+ multi_json (~> 1.0)
126
+ rack (~> 1.2)
127
+ omniauth (1.1.1)
128
+ hashie (~> 1.2)
129
+ rack
130
+ omniauth-instagram (1.0.0)
131
+ omniauth (~> 1.0)
132
+ omniauth-oauth2 (~> 1.0)
133
+ omniauth-oauth2 (1.1.1)
134
+ oauth2 (~> 0.8.0)
135
+ omniauth (~> 1.0)
136
+ polyglot (0.3.3)
137
+ pusher (0.11.1)
138
+ multi_json (~> 1.0)
139
+ signature (~> 0.1.6)
140
+ rack (1.4.1)
141
+ rack-cache (1.2)
142
+ rack (>= 0.4)
143
+ rack-ssl (1.3.2)
144
+ rack
145
+ rack-test (0.6.2)
146
+ rack (>= 1.0)
147
+ rails (3.2.9)
148
+ actionmailer (= 3.2.9)
149
+ actionpack (= 3.2.9)
150
+ activerecord (= 3.2.9)
151
+ activeresource (= 3.2.9)
152
+ activesupport (= 3.2.9)
153
+ bundler (~> 1.0)
154
+ railties (= 3.2.9)
155
+ railties (3.2.9)
156
+ actionpack (= 3.2.9)
157
+ activesupport (= 3.2.9)
158
+ rack-ssl (~> 1.3.2)
159
+ rake (>= 0.8.7)
160
+ rdoc (~> 3.4)
161
+ thor (>= 0.14.6, < 2.0)
162
+ rake (10.0.2)
163
+ rdoc (3.12)
164
+ json (~> 1.4)
165
+ redis (3.0.2)
166
+ rspec (2.12.0)
167
+ rspec-core (~> 2.12.0)
168
+ rspec-expectations (~> 2.12.0)
169
+ rspec-mocks (~> 2.12.0)
170
+ rspec-core (2.12.0)
171
+ rspec-expectations (2.12.0)
172
+ diff-lcs (~> 1.1.3)
173
+ rspec-mocks (2.12.0)
174
+ rspec-rails (2.12.0)
175
+ actionpack (>= 3.0)
176
+ activesupport (>= 3.0)
177
+ railties (>= 3.0)
178
+ rspec-core (~> 2.12.0)
179
+ rspec-expectations (~> 2.12.0)
180
+ rspec-mocks (~> 2.12.0)
181
+ rubyzip (0.9.9)
182
+ selenium-webdriver (2.25.0)
183
+ childprocess (>= 0.2.5)
184
+ libwebsocket (~> 0.1.3)
185
+ multi_json (~> 1.0)
186
+ rubyzip
187
+ signature (0.1.6)
188
+ sprockets (2.2.2)
189
+ hike (~> 1.2)
190
+ multi_json (~> 1.0)
191
+ rack (~> 1.0)
192
+ tilt (~> 1.1, != 1.3.0)
193
+ sqlite3 (1.3.6)
194
+ thor (0.16.0)
195
+ tilt (1.3.3)
196
+ treetop (1.4.12)
197
+ polyglot
198
+ polyglot (>= 0.3.1)
199
+ tzinfo (0.3.35)
200
+ weighted_randomizer (0.1.2)
201
+ xpath (0.1.4)
202
+ nokogiri (~> 1.3)
203
+ yard (0.8.3)
204
+ yard-rails (0.3.0)
205
+ yard
206
+
207
+ PLATFORMS
208
+ ruby
209
+
210
+ DEPENDENCIES
211
+ capybara
212
+ capybara-webkit
213
+ corkboard!
214
+ ffaker
215
+ jasmine
216
+ jasminerice!
217
+ jasminerice-runner
218
+ jquery-rails
219
+ mock_redis
220
+ rspec-rails
221
+ sqlite3
222
+ yard
223
+ yard-rails
File without changes
@@ -0,0 +1,41 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require "corkboard/version"
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = "corkboard"
9
+ s.version = Corkboard::VERSION
10
+ s.authors = ["Corey Innis"]
11
+ s.email = ["corey@coolerator.net"]
12
+ s.homepage = "https://github.com/fullandby/corkboard"
13
+ s.summary = "Dashboard composed of social network posts."
14
+ s.description = "Dashboard composed of social network posts."
15
+
16
+ s.files = `git ls-files`.split($\)
17
+ s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
19
+
20
+ s.add_dependency "rails", "~> 3.2.8"
21
+ s.add_dependency "jquery-rails"
22
+ s.add_dependency "redis"
23
+ s.add_dependency "weighted_randomizer"
24
+ s.add_dependency "pusher"
25
+ s.add_dependency "instagram"
26
+ s.add_dependency "omniauth"
27
+ s.add_dependency "omniauth-oauth2"
28
+ s.add_dependency "omniauth-instagram"
29
+
30
+ s.add_development_dependency "rspec-rails"
31
+ s.add_development_dependency "capybara"
32
+ s.add_development_dependency "capybara-webkit"
33
+ s.add_development_dependency "ffaker"
34
+ s.add_development_dependency "jasmine"
35
+ s.add_development_dependency "jasminerice"
36
+ s.add_development_dependency "jasminerice-runner"
37
+ s.add_development_dependency "mock_redis"
38
+ s.add_development_dependency "sqlite3"
39
+ s.add_development_dependency "yard"
40
+ s.add_development_dependency "yard-rails"
41
+ end
@@ -1,3 +1,3 @@
1
1
  module Corkboard
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ ENGINE_ROOT = File.expand_path('../..', __FILE__)
5
+ ENGINE_PATH = File.expand_path('../../lib/corkboard/engine', __FILE__)
6
+
7
+ require 'rails/all'
8
+ require 'rails/engine/commands'
@@ -0,0 +1,7 @@
1
+ require "spec_helper"
2
+
3
+ describe Corkboard::ApplicationController do
4
+ it "is defined" do
5
+ expect(Corkboard::ApplicationController).to be
6
+ end
7
+ end
@@ -0,0 +1,26 @@
1
+ require "spec_helper"
2
+
3
+ describe Corkboard::AuthorizationsController do
4
+ describe "GET corkboard/authorizations#index" do
5
+ context "when the authentication requirement for 'admin' is :disallow!" do
6
+ it "raises an exception" do
7
+ with_config(:authentication, { :admin => :disallow! }) do
8
+ expect { get(:index) }
9
+ .to raise_error(Corkboard::ActionForbidden)
10
+ end
11
+ end
12
+ end
13
+ end
14
+
15
+ describe "GET corkboard/authorizations#create" do
16
+ it "is pending" do
17
+ pending
18
+ end
19
+ end
20
+
21
+ describe "GET corkboard/authorizations#destroy" do
22
+ it "is pending" do
23
+ pending
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,29 @@
1
+ require "spec_helper"
2
+
3
+ describe Corkboard::BoardController do
4
+ describe "GET #show" do
5
+ it "is successful" do
6
+ pending
7
+
8
+ get(:show)
9
+ expect(response).to be_success
10
+ end
11
+
12
+ it "renders :show" do
13
+ pending
14
+ end
15
+
16
+ it "passes :locals" do
17
+ pending
18
+ end
19
+
20
+ context "when the authentication requirement for 'board' is :disallow!" do
21
+ it "raises an exception" do
22
+ with_config(:authentication, { :board => :disallow! }) do
23
+ expect { get(:show) }
24
+ .to raise_error(Corkboard::ActionForbidden)
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,7 @@
1
+ require "spec_helper"
2
+
3
+ describe Corkboard::PostsController do
4
+ it "is pending" do
5
+ pending
6
+ end
7
+ end
@@ -0,0 +1,52 @@
1
+ require "spec_helper"
2
+
3
+ describe Corkboard::Client do
4
+ let(:client) { empty_client }
5
+ let(:instance) { client.new }
6
+
7
+ describe "#strategy" do
8
+ it "is pending" do
9
+ pending
10
+ end
11
+ end
12
+
13
+ describe "#callback_url" do
14
+ it "is pending" do
15
+ pending
16
+ end
17
+ end
18
+
19
+ describe "#preload" do
20
+ it "is pending" do
21
+ pending
22
+ end
23
+ end
24
+
25
+ describe "#recent" do
26
+ it "is pending" do
27
+ pending
28
+ end
29
+ end
30
+
31
+ describe "#subscribe" do
32
+ it "is pending" do
33
+ pending
34
+ end
35
+ end
36
+
37
+ describe "#subscribe_callback" do
38
+ it "is pending" do
39
+ pending
40
+ end
41
+ end
42
+
43
+ def empty_client
44
+ @empty_client ||= Class.new do
45
+ include Corkboard::Client
46
+
47
+ def self.name
48
+ 'Example'
49
+ end
50
+ end
51
+ end
52
+ end