keen 0.1.0 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +19 -0
- data/LICENSE.txt +20 -0
- data/README.md +20 -1
- data/Rakefile +48 -0
- data/VERSION.yml +5 -0
- data/ext/mkrf_conf.rb +16 -0
- data/features/add_event.feature +1 -1
- data/features/step_definitions/keen_steps.rb +1 -1
- data/features/support/env.rb +15 -0
- data/{keen.gemspec → keen.gemspec.old} +3 -9
- data/lib/keen/version.rb +18 -2
- metadata +124 -125
- data/.gitignore +0 -9
- data/examples/rails_2/.rvmrc +0 -2
- data/examples/rails_2/CoolForums/README +0 -243
- data/examples/rails_2/CoolForums/Rakefile +0 -10
- data/examples/rails_2/CoolForums/app/controllers/application_controller.rb +0 -33
- data/examples/rails_2/CoolForums/app/controllers/forums_controller.rb +0 -83
- data/examples/rails_2/CoolForums/app/controllers/users_controller.rb +0 -83
- data/examples/rails_2/CoolForums/app/helpers/application_helper.rb +0 -3
- data/examples/rails_2/CoolForums/app/helpers/forums_helper.rb +0 -2
- data/examples/rails_2/CoolForums/app/helpers/users_helper.rb +0 -2
- data/examples/rails_2/CoolForums/app/models/forum.rb +0 -2
- data/examples/rails_2/CoolForums/app/models/user.rb +0 -2
- data/examples/rails_2/CoolForums/app/views/forums/edit.html.erb +0 -16
- data/examples/rails_2/CoolForums/app/views/forums/index.html.erb +0 -20
- data/examples/rails_2/CoolForums/app/views/forums/new.html.erb +0 -15
- data/examples/rails_2/CoolForums/app/views/forums/show.html.erb +0 -8
- data/examples/rails_2/CoolForums/app/views/layouts/forums.html.erb +0 -17
- data/examples/rails_2/CoolForums/app/views/layouts/users.html.erb +0 -17
- data/examples/rails_2/CoolForums/app/views/users/edit.html.erb +0 -20
- data/examples/rails_2/CoolForums/app/views/users/index.html.erb +0 -22
- data/examples/rails_2/CoolForums/app/views/users/new.html.erb +0 -19
- data/examples/rails_2/CoolForums/app/views/users/show.html.erb +0 -13
- data/examples/rails_2/CoolForums/config/boot.rb +0 -114
- data/examples/rails_2/CoolForums/config/database.yml +0 -22
- data/examples/rails_2/CoolForums/config/environment.rb +0 -41
- data/examples/rails_2/CoolForums/config/environments/development.rb +0 -17
- data/examples/rails_2/CoolForums/config/environments/production.rb +0 -28
- data/examples/rails_2/CoolForums/config/environments/test.rb +0 -28
- data/examples/rails_2/CoolForums/config/initializers/backtrace_silencers.rb +0 -7
- data/examples/rails_2/CoolForums/config/initializers/cookie_verification_secret.rb +0 -7
- data/examples/rails_2/CoolForums/config/initializers/inflections.rb +0 -10
- data/examples/rails_2/CoolForums/config/initializers/mime_types.rb +0 -5
- data/examples/rails_2/CoolForums/config/initializers/new_rails_defaults.rb +0 -21
- data/examples/rails_2/CoolForums/config/initializers/session_store.rb +0 -15
- data/examples/rails_2/CoolForums/config/locales/en.yml +0 -5
- data/examples/rails_2/CoolForums/config/routes.rb +0 -53
- data/examples/rails_2/CoolForums/db/migrate/20120317012301_create_users.rb +0 -15
- data/examples/rails_2/CoolForums/db/migrate/20120317012444_create_forums.rb +0 -14
- data/examples/rails_2/CoolForums/db/schema.rb +0 -28
- data/examples/rails_2/CoolForums/db/seeds.rb +0 -7
- data/examples/rails_2/CoolForums/doc/README_FOR_APP +0 -2
- data/examples/rails_2/CoolForums/public/404.html +0 -30
- data/examples/rails_2/CoolForums/public/422.html +0 -30
- data/examples/rails_2/CoolForums/public/500.html +0 -30
- data/examples/rails_2/CoolForums/public/favicon.ico +0 -0
- data/examples/rails_2/CoolForums/public/images/rails.png +0 -0
- data/examples/rails_2/CoolForums/public/index.html +0 -275
- data/examples/rails_2/CoolForums/public/javascripts/application.js +0 -2
- data/examples/rails_2/CoolForums/public/javascripts/controls.js +0 -963
- data/examples/rails_2/CoolForums/public/javascripts/dragdrop.js +0 -973
- data/examples/rails_2/CoolForums/public/javascripts/effects.js +0 -1128
- data/examples/rails_2/CoolForums/public/javascripts/prototype.js +0 -4320
- data/examples/rails_2/CoolForums/public/robots.txt +0 -5
- data/examples/rails_2/CoolForums/public/stylesheets/scaffold.css +0 -54
- data/examples/rails_2/CoolForums/script/about +0 -4
- data/examples/rails_2/CoolForums/script/console +0 -3
- data/examples/rails_2/CoolForums/script/dbconsole +0 -3
- data/examples/rails_2/CoolForums/script/destroy +0 -3
- data/examples/rails_2/CoolForums/script/generate +0 -3
- data/examples/rails_2/CoolForums/script/performance/benchmarker +0 -3
- data/examples/rails_2/CoolForums/script/performance/profiler +0 -3
- data/examples/rails_2/CoolForums/script/plugin +0 -3
- data/examples/rails_2/CoolForums/script/runner +0 -3
- data/examples/rails_2/CoolForums/script/server +0 -3
- data/examples/rails_2/CoolForums/test/fixtures/forums.yml +0 -9
- data/examples/rails_2/CoolForums/test/fixtures/users.yml +0 -11
- data/examples/rails_2/CoolForums/test/functional/forums_controller_test.rb +0 -45
- data/examples/rails_2/CoolForums/test/functional/users_controller_test.rb +0 -45
- data/examples/rails_2/CoolForums/test/performance/browsing_test.rb +0 -9
- data/examples/rails_2/CoolForums/test/test_helper.rb +0 -38
- data/examples/rails_2/CoolForums/test/unit/forum_test.rb +0 -8
- data/examples/rails_2/CoolForums/test/unit/helpers/forums_helper_test.rb +0 -4
- data/examples/rails_2/CoolForums/test/unit/helpers/users_helper_test.rb +0 -4
- data/examples/rails_2/CoolForums/test/unit/user_test.rb +0 -8
- data/examples/rails_2/Gemfile +0 -5
- data/test/keen_spec.rb +0 -34
@@ -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,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,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
|
data/examples/rails_2/Gemfile
DELETED
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
|