keen 0.1.0 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/Gemfile +19 -0
  2. data/LICENSE.txt +20 -0
  3. data/README.md +20 -1
  4. data/Rakefile +48 -0
  5. data/VERSION.yml +5 -0
  6. data/ext/mkrf_conf.rb +16 -0
  7. data/features/add_event.feature +1 -1
  8. data/features/step_definitions/keen_steps.rb +1 -1
  9. data/features/support/env.rb +15 -0
  10. data/{keen.gemspec → keen.gemspec.old} +3 -9
  11. data/lib/keen/version.rb +18 -2
  12. metadata +124 -125
  13. data/.gitignore +0 -9
  14. data/examples/rails_2/.rvmrc +0 -2
  15. data/examples/rails_2/CoolForums/README +0 -243
  16. data/examples/rails_2/CoolForums/Rakefile +0 -10
  17. data/examples/rails_2/CoolForums/app/controllers/application_controller.rb +0 -33
  18. data/examples/rails_2/CoolForums/app/controllers/forums_controller.rb +0 -83
  19. data/examples/rails_2/CoolForums/app/controllers/users_controller.rb +0 -83
  20. data/examples/rails_2/CoolForums/app/helpers/application_helper.rb +0 -3
  21. data/examples/rails_2/CoolForums/app/helpers/forums_helper.rb +0 -2
  22. data/examples/rails_2/CoolForums/app/helpers/users_helper.rb +0 -2
  23. data/examples/rails_2/CoolForums/app/models/forum.rb +0 -2
  24. data/examples/rails_2/CoolForums/app/models/user.rb +0 -2
  25. data/examples/rails_2/CoolForums/app/views/forums/edit.html.erb +0 -16
  26. data/examples/rails_2/CoolForums/app/views/forums/index.html.erb +0 -20
  27. data/examples/rails_2/CoolForums/app/views/forums/new.html.erb +0 -15
  28. data/examples/rails_2/CoolForums/app/views/forums/show.html.erb +0 -8
  29. data/examples/rails_2/CoolForums/app/views/layouts/forums.html.erb +0 -17
  30. data/examples/rails_2/CoolForums/app/views/layouts/users.html.erb +0 -17
  31. data/examples/rails_2/CoolForums/app/views/users/edit.html.erb +0 -20
  32. data/examples/rails_2/CoolForums/app/views/users/index.html.erb +0 -22
  33. data/examples/rails_2/CoolForums/app/views/users/new.html.erb +0 -19
  34. data/examples/rails_2/CoolForums/app/views/users/show.html.erb +0 -13
  35. data/examples/rails_2/CoolForums/config/boot.rb +0 -114
  36. data/examples/rails_2/CoolForums/config/database.yml +0 -22
  37. data/examples/rails_2/CoolForums/config/environment.rb +0 -41
  38. data/examples/rails_2/CoolForums/config/environments/development.rb +0 -17
  39. data/examples/rails_2/CoolForums/config/environments/production.rb +0 -28
  40. data/examples/rails_2/CoolForums/config/environments/test.rb +0 -28
  41. data/examples/rails_2/CoolForums/config/initializers/backtrace_silencers.rb +0 -7
  42. data/examples/rails_2/CoolForums/config/initializers/cookie_verification_secret.rb +0 -7
  43. data/examples/rails_2/CoolForums/config/initializers/inflections.rb +0 -10
  44. data/examples/rails_2/CoolForums/config/initializers/mime_types.rb +0 -5
  45. data/examples/rails_2/CoolForums/config/initializers/new_rails_defaults.rb +0 -21
  46. data/examples/rails_2/CoolForums/config/initializers/session_store.rb +0 -15
  47. data/examples/rails_2/CoolForums/config/locales/en.yml +0 -5
  48. data/examples/rails_2/CoolForums/config/routes.rb +0 -53
  49. data/examples/rails_2/CoolForums/db/migrate/20120317012301_create_users.rb +0 -15
  50. data/examples/rails_2/CoolForums/db/migrate/20120317012444_create_forums.rb +0 -14
  51. data/examples/rails_2/CoolForums/db/schema.rb +0 -28
  52. data/examples/rails_2/CoolForums/db/seeds.rb +0 -7
  53. data/examples/rails_2/CoolForums/doc/README_FOR_APP +0 -2
  54. data/examples/rails_2/CoolForums/public/404.html +0 -30
  55. data/examples/rails_2/CoolForums/public/422.html +0 -30
  56. data/examples/rails_2/CoolForums/public/500.html +0 -30
  57. data/examples/rails_2/CoolForums/public/favicon.ico +0 -0
  58. data/examples/rails_2/CoolForums/public/images/rails.png +0 -0
  59. data/examples/rails_2/CoolForums/public/index.html +0 -275
  60. data/examples/rails_2/CoolForums/public/javascripts/application.js +0 -2
  61. data/examples/rails_2/CoolForums/public/javascripts/controls.js +0 -963
  62. data/examples/rails_2/CoolForums/public/javascripts/dragdrop.js +0 -973
  63. data/examples/rails_2/CoolForums/public/javascripts/effects.js +0 -1128
  64. data/examples/rails_2/CoolForums/public/javascripts/prototype.js +0 -4320
  65. data/examples/rails_2/CoolForums/public/robots.txt +0 -5
  66. data/examples/rails_2/CoolForums/public/stylesheets/scaffold.css +0 -54
  67. data/examples/rails_2/CoolForums/script/about +0 -4
  68. data/examples/rails_2/CoolForums/script/console +0 -3
  69. data/examples/rails_2/CoolForums/script/dbconsole +0 -3
  70. data/examples/rails_2/CoolForums/script/destroy +0 -3
  71. data/examples/rails_2/CoolForums/script/generate +0 -3
  72. data/examples/rails_2/CoolForums/script/performance/benchmarker +0 -3
  73. data/examples/rails_2/CoolForums/script/performance/profiler +0 -3
  74. data/examples/rails_2/CoolForums/script/plugin +0 -3
  75. data/examples/rails_2/CoolForums/script/runner +0 -3
  76. data/examples/rails_2/CoolForums/script/server +0 -3
  77. data/examples/rails_2/CoolForums/test/fixtures/forums.yml +0 -9
  78. data/examples/rails_2/CoolForums/test/fixtures/users.yml +0 -11
  79. data/examples/rails_2/CoolForums/test/functional/forums_controller_test.rb +0 -45
  80. data/examples/rails_2/CoolForums/test/functional/users_controller_test.rb +0 -45
  81. data/examples/rails_2/CoolForums/test/performance/browsing_test.rb +0 -9
  82. data/examples/rails_2/CoolForums/test/test_helper.rb +0 -38
  83. data/examples/rails_2/CoolForums/test/unit/forum_test.rb +0 -8
  84. data/examples/rails_2/CoolForums/test/unit/helpers/forums_helper_test.rb +0 -4
  85. data/examples/rails_2/CoolForums/test/unit/helpers/users_helper_test.rb +0 -4
  86. data/examples/rails_2/CoolForums/test/unit/user_test.rb +0 -8
  87. data/examples/rails_2/Gemfile +0 -5
  88. data/test/keen_spec.rb +0 -34
@@ -1,5 +0,0 @@
1
- # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
- #
3
- # To ban all spiders from the entire site uncomment the next two lines:
4
- # User-Agent: *
5
- # Disallow: /
@@ -1,54 +0,0 @@
1
- body { background-color: #fff; color: #333; }
2
-
3
- body, p, ol, ul, td {
4
- font-family: verdana, arial, helvetica, sans-serif;
5
- font-size: 13px;
6
- line-height: 18px;
7
- }
8
-
9
- pre {
10
- background-color: #eee;
11
- padding: 10px;
12
- font-size: 11px;
13
- }
14
-
15
- a { color: #000; }
16
- a:visited { color: #666; }
17
- a:hover { color: #fff; background-color:#000; }
18
-
19
- .fieldWithErrors {
20
- padding: 2px;
21
- background-color: red;
22
- display: table;
23
- }
24
-
25
- #errorExplanation {
26
- width: 400px;
27
- border: 2px solid red;
28
- padding: 7px;
29
- padding-bottom: 12px;
30
- margin-bottom: 20px;
31
- background-color: #f0f0f0;
32
- }
33
-
34
- #errorExplanation h2 {
35
- text-align: left;
36
- font-weight: bold;
37
- padding: 5px 5px 5px 15px;
38
- font-size: 12px;
39
- margin: -7px;
40
- background-color: #c00;
41
- color: #fff;
42
- }
43
-
44
- #errorExplanation p {
45
- color: #333;
46
- margin-bottom: 0;
47
- padding: 5px;
48
- }
49
-
50
- #errorExplanation ul li {
51
- font-size: 12px;
52
- list-style: square;
53
- }
54
-
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
4
- require 'commands/about'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- require 'commands/console'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- require 'commands/dbconsole'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- require 'commands/destroy'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- require 'commands/generate'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../../config/boot', __FILE__)
3
- require 'commands/performance/benchmarker'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../../config/boot', __FILE__)
3
- require 'commands/performance/profiler'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- require 'commands/plugin'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- require 'commands/runner'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- require 'commands/server'
@@ -1,9 +0,0 @@
1
- # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
-
3
- one:
4
- name: MyString
5
- admin:
6
-
7
- two:
8
- name: MyString
9
- admin:
@@ -1,11 +0,0 @@
1
- # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
-
3
- one:
4
- name: MyString
5
- email: MyString
6
- password: MyString
7
-
8
- two:
9
- name: MyString
10
- email: MyString
11
- password: MyString
@@ -1,45 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ForumsControllerTest < ActionController::TestCase
4
- test "should get index" do
5
- get :index
6
- assert_response :success
7
- assert_not_nil assigns(:forums)
8
- end
9
-
10
- test "should get new" do
11
- get :new
12
- assert_response :success
13
- end
14
-
15
- test "should create forum" do
16
- assert_difference('Forum.count') do
17
- post :create, :forum => { }
18
- end
19
-
20
- assert_redirected_to forum_path(assigns(:forum))
21
- end
22
-
23
- test "should show forum" do
24
- get :show, :id => forums(:one).to_param
25
- assert_response :success
26
- end
27
-
28
- test "should get edit" do
29
- get :edit, :id => forums(:one).to_param
30
- assert_response :success
31
- end
32
-
33
- test "should update forum" do
34
- put :update, :id => forums(:one).to_param, :forum => { }
35
- assert_redirected_to forum_path(assigns(:forum))
36
- end
37
-
38
- test "should destroy forum" do
39
- assert_difference('Forum.count', -1) do
40
- delete :destroy, :id => forums(:one).to_param
41
- end
42
-
43
- assert_redirected_to forums_path
44
- end
45
- end
@@ -1,45 +0,0 @@
1
- require 'test_helper'
2
-
3
- class UsersControllerTest < ActionController::TestCase
4
- test "should get index" do
5
- get :index
6
- assert_response :success
7
- assert_not_nil assigns(:users)
8
- end
9
-
10
- test "should get new" do
11
- get :new
12
- assert_response :success
13
- end
14
-
15
- test "should create user" do
16
- assert_difference('User.count') do
17
- post :create, :user => { }
18
- end
19
-
20
- assert_redirected_to user_path(assigns(:user))
21
- end
22
-
23
- test "should show user" do
24
- get :show, :id => users(:one).to_param
25
- assert_response :success
26
- end
27
-
28
- test "should get edit" do
29
- get :edit, :id => users(:one).to_param
30
- assert_response :success
31
- end
32
-
33
- test "should update user" do
34
- put :update, :id => users(:one).to_param, :user => { }
35
- assert_redirected_to user_path(assigns(:user))
36
- end
37
-
38
- test "should destroy user" do
39
- assert_difference('User.count', -1) do
40
- delete :destroy, :id => users(:one).to_param
41
- end
42
-
43
- assert_redirected_to users_path
44
- end
45
- end
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
- require 'performance_test_help'
3
-
4
- # Profiling results for each test method are written to tmp/performance.
5
- class BrowsingTest < ActionController::PerformanceTest
6
- def test_homepage
7
- get '/'
8
- end
9
- end
@@ -1,38 +0,0 @@
1
- ENV["RAILS_ENV"] = "test"
2
- require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3
- require 'test_help'
4
-
5
- class ActiveSupport::TestCase
6
- # Transactional fixtures accelerate your tests by wrapping each test method
7
- # in a transaction that's rolled back on completion. This ensures that the
8
- # test database remains unchanged so your fixtures don't have to be reloaded
9
- # between every test method. Fewer database queries means faster tests.
10
- #
11
- # Read Mike Clark's excellent walkthrough at
12
- # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
13
- #
14
- # Every Active Record database supports transactions except MyISAM tables
15
- # in MySQL. Turn off transactional fixtures in this case; however, if you
16
- # don't care one way or the other, switching from MyISAM to InnoDB tables
17
- # is recommended.
18
- #
19
- # The only drawback to using transactional fixtures is when you actually
20
- # need to test transactions. Since your test is bracketed by a transaction,
21
- # any transactions started in your code will be automatically rolled back.
22
- self.use_transactional_fixtures = true
23
-
24
- # Instantiated fixtures are slow, but give you @david where otherwise you
25
- # would need people(:david). If you don't want to migrate your existing
26
- # test cases which use the @david style and don't mind the speed hit (each
27
- # instantiated fixtures translates to a database query per test method),
28
- # then set this back to true.
29
- self.use_instantiated_fixtures = false
30
-
31
- # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
32
- #
33
- # Note: You'll currently still have to declare fixtures explicitly in integration tests
34
- # -- they do not yet inherit this setting
35
- fixtures :all
36
-
37
- # Add more helper methods to be used by all tests here...
38
- end
@@ -1,8 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ForumTest < ActiveSupport::TestCase
4
- # Replace this with your real tests.
5
- test "the truth" do
6
- assert true
7
- end
8
- end
@@ -1,4 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ForumsHelperTest < ActionView::TestCase
4
- end
@@ -1,4 +0,0 @@
1
- require 'test_helper'
2
-
3
- class UsersHelperTest < ActionView::TestCase
4
- end
@@ -1,8 +0,0 @@
1
- require 'test_helper'
2
-
3
- class UserTest < ActiveSupport::TestCase
4
- # Replace this with your real tests.
5
- test "the truth" do
6
- assert true
7
- end
8
- end
@@ -1,5 +0,0 @@
1
- source :rubygems
2
- gem 'rails', '2.3.14'
3
- gem 'rspec', '2.8.0'
4
- gem 'keen'
5
- gem 'sqlite3'
data/test/keen_spec.rb DELETED
@@ -1,34 +0,0 @@
1
- $LOAD_PATH << File.join(File.dirname(__FILE__), "..", "lib")
2
-
3
- require "keen"
4
-
5
- describe Keen::Client do
6
-
7
- # The add_event method should add stuff to Redis:
8
- describe "#add_event" do
9
-
10
- # set up the Keen Client instance:
11
- project_id = "4f5775ad163d666a6100000e"
12
- auth_token = "a5d4eaf432914823a94ecd7e0cb547b9"
13
-
14
- # Make a client:
15
- client = Keen::Client.new(project_id,
16
- auth_token,
17
- :storage_class => Keen::Async::Storage::RedisHandler,
18
- :logging => true )
19
-
20
- # Flush the queue first:
21
- client.clear_active_queue()
22
-
23
- # Send some events to the client, which should persist them in Redis
24
- 5.times do
25
- client.add_event("rspec_clicks", {
26
- :hi => "you",
27
- })
28
- end
29
-
30
- # Make sure we have the right number of things in the queue:
31
- client.storage_handler.count_active_queue.should == 5
32
-
33
- end
34
- end