simplekiss 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/example_kissmetrics.yml +14 -0
- data/lib/simplekiss.rb +17 -0
- data/nbproject/private/config.properties +0 -0
- data/nbproject/private/private.properties +3 -0
- data/nbproject/private/rake-d.txt +27 -0
- data/nbproject/project.properties +9 -0
- data/nbproject/project.xml +16 -0
- data/rails/init.rb +4 -0
- data/simplekiss.gemspec +58 -0
- data/test/helper.rb +9 -0
- data/test/test_simplekiss.rb +7 -0
- metadata +73 -0
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2009 Jamie Lawrence
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
= simplekiss
|
|
2
|
+
|
|
3
|
+
Description goes here.
|
|
4
|
+
|
|
5
|
+
== Note on Patches/Pull Requests
|
|
6
|
+
|
|
7
|
+
* Fork the project.
|
|
8
|
+
* Make your feature addition or bug fix.
|
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
|
10
|
+
future version unintentionally.
|
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
|
12
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
|
13
|
+
* Send me a pull request. Bonus points for topic branches.
|
|
14
|
+
|
|
15
|
+
== Copyright
|
|
16
|
+
|
|
17
|
+
Copyright (c) 2010 Jamie Lawrence. See LICENSE for details.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
require 'rubygems'
|
|
2
|
+
require 'rake'
|
|
3
|
+
|
|
4
|
+
begin
|
|
5
|
+
require 'jeweler'
|
|
6
|
+
Jeweler::Tasks.new do |gem|
|
|
7
|
+
gem.name = "simplekiss"
|
|
8
|
+
gem.summary = "A simple library for adding KISSmetrics to your pages"
|
|
9
|
+
gem.description = "A simple library which adds KISSMetrics javascript to your pages, based on a YAML config file"
|
|
10
|
+
gem.email = "jamie@shutterscouts.com"
|
|
11
|
+
gem.homepage = "http://github.com/hopeless/simplekiss"
|
|
12
|
+
gem.authors = ["Jamie Lawrence"]
|
|
13
|
+
gem.files.include %w(rails/init.rb)
|
|
14
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
|
15
|
+
end
|
|
16
|
+
Jeweler::GemcutterTasks.new
|
|
17
|
+
rescue LoadError
|
|
18
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
require 'rake/testtask'
|
|
22
|
+
Rake::TestTask.new(:test) do |test|
|
|
23
|
+
test.libs << 'lib' << 'test'
|
|
24
|
+
test.pattern = 'test/**/test_*.rb'
|
|
25
|
+
test.verbose = true
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
begin
|
|
29
|
+
require 'rcov/rcovtask'
|
|
30
|
+
Rcov::RcovTask.new do |test|
|
|
31
|
+
test.libs << 'test'
|
|
32
|
+
test.pattern = 'test/**/test_*.rb'
|
|
33
|
+
test.verbose = true
|
|
34
|
+
end
|
|
35
|
+
rescue LoadError
|
|
36
|
+
task :rcov do
|
|
37
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
task :test => :check_dependencies
|
|
42
|
+
|
|
43
|
+
task :default => :test
|
|
44
|
+
|
|
45
|
+
require 'rake/rdoctask'
|
|
46
|
+
Rake::RDocTask.new do |rdoc|
|
|
47
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
|
48
|
+
|
|
49
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
50
|
+
rdoc.title = "simplekiss #{version}"
|
|
51
|
+
rdoc.rdoc_files.include('README*')
|
|
52
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
53
|
+
end
|
data/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.0
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#KISSmetrics configuration file.
|
|
2
|
+
---
|
|
3
|
+
apikey: <enter your api key here>
|
|
4
|
+
|
|
5
|
+
<controller>:
|
|
6
|
+
<action>: 'kissmetrics step title'
|
|
7
|
+
<another action>: 'kissmetrics step title'
|
|
8
|
+
|
|
9
|
+
# Example usage
|
|
10
|
+
user:
|
|
11
|
+
new: 'Visit signup page'
|
|
12
|
+
show: 'Viewed account page'
|
|
13
|
+
post:
|
|
14
|
+
new: 'Create a new post'
|
data/lib/simplekiss.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module SimpleKiss
|
|
2
|
+
def kissmetrics(use_default = true)
|
|
3
|
+
slug = CONFIG[controller_name][action_name]
|
|
4
|
+
slug ||= "#{controller_name}/#{action_name}" if use_default
|
|
5
|
+
apikey = CONFIG['apikey'] #"f07d00f8f9e6049d5c106a14612fa1614d4f3d40"
|
|
6
|
+
|
|
7
|
+
(slug) ?
|
|
8
|
+
" <script type=\"text/javascript\">
|
|
9
|
+
var KM_KEY = \"#{apikey}\";
|
|
10
|
+
document.write(unescape(\"%3Cscript src='\" + ((\"https:\" == document.location.protocol) ? \"https://s3.amazonaws.com/\" : \"http://\") + \"scripts.kissmetrics.com/t.js' type='text/javascript'%3E%3C/script%3E\"));
|
|
11
|
+
</script>
|
|
12
|
+
<script type=\"text/javascript\">
|
|
13
|
+
KM.record(\"#{slug}\")
|
|
14
|
+
</script>
|
|
15
|
+
" : ""
|
|
16
|
+
end
|
|
17
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
build=Build gem
|
|
2
|
+
check_dependencies=Check that runtime and development dependencies are installed
|
|
3
|
+
check_dependencies\:development=Check that development dependencies are installed
|
|
4
|
+
check_dependencies\:runtime=Check that runtime dependencies are installed
|
|
5
|
+
clobber=
|
|
6
|
+
clobber_rdoc=Remove rdoc products
|
|
7
|
+
default=
|
|
8
|
+
gemcutter\:release=Release gem to Gemcutter
|
|
9
|
+
gemspec=Generate and validates gemspec
|
|
10
|
+
gemspec\:debug=Display the gemspec for debugging purposes
|
|
11
|
+
gemspec\:generate=Generates the gemspec, using version from VERSION
|
|
12
|
+
gemspec\:validate=Validates the gemspec
|
|
13
|
+
git\:release=Tag a release in Git
|
|
14
|
+
github\:release=Release Gem to GitHub
|
|
15
|
+
install=Install gem using sudo
|
|
16
|
+
rcov=
|
|
17
|
+
rdoc=Build the rdoc HTML Files
|
|
18
|
+
rdoc/index.html=
|
|
19
|
+
release=Release gem
|
|
20
|
+
rerdoc=Force a rebuild of the RDOC files
|
|
21
|
+
test=Run tests
|
|
22
|
+
version=Displays the current version
|
|
23
|
+
version\:bump\:major=Bump the gemspec by a major version.
|
|
24
|
+
version\:bump\:minor=Bump the gemspec by a minor version.
|
|
25
|
+
version\:bump\:patch=Bump the gemspec by a patch version.
|
|
26
|
+
version\:write=Writes out an explicit version. Respects the following environment variables, or defaults to 0: MAJOR, MINOR, PATCH. Also recognizes BUILD, which defaults to nil
|
|
27
|
+
version_required=
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
file.reference.simplekiss-lib=simplekiss/lib
|
|
2
|
+
file.reference.simplekiss-test=simplekiss/test
|
|
3
|
+
javac.classpath=
|
|
4
|
+
main.file=
|
|
5
|
+
platform.active=Ruby
|
|
6
|
+
source.encoding=UTF-8
|
|
7
|
+
src.dir=${file.reference.simplekiss-lib}
|
|
8
|
+
src.rails.dir=rails
|
|
9
|
+
test.src.dir=${file.reference.simplekiss-test}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
3
|
+
<type>org.netbeans.modules.ruby.rubyproject</type>
|
|
4
|
+
<configuration>
|
|
5
|
+
<data xmlns="http://www.netbeans.org/ns/ruby-project/1">
|
|
6
|
+
<name>SimpleKiss</name>
|
|
7
|
+
<source-roots>
|
|
8
|
+
<root id="src.rails.dir"/>
|
|
9
|
+
<root id="src.dir"/>
|
|
10
|
+
</source-roots>
|
|
11
|
+
<test-roots>
|
|
12
|
+
<root id="test.src.dir"/>
|
|
13
|
+
</test-roots>
|
|
14
|
+
</data>
|
|
15
|
+
</configuration>
|
|
16
|
+
</project>
|
data/rails/init.rb
ADDED
data/simplekiss.gemspec
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Generated by jeweler
|
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
|
4
|
+
# -*- encoding: utf-8 -*-
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |s|
|
|
7
|
+
s.name = %q{simplekiss}
|
|
8
|
+
s.version = "0.0.0"
|
|
9
|
+
|
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
|
+
s.authors = ["Jamie Lawrence"]
|
|
12
|
+
s.date = %q{2010-02-19}
|
|
13
|
+
s.description = %q{A simple library which adds KISSMetrics javascript to your pages, based on a YAML config file}
|
|
14
|
+
s.email = %q{jamie@shutterscouts.com}
|
|
15
|
+
s.extra_rdoc_files = [
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"README.rdoc"
|
|
18
|
+
]
|
|
19
|
+
s.files = [
|
|
20
|
+
".document",
|
|
21
|
+
".gitignore",
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"README.rdoc",
|
|
24
|
+
"Rakefile",
|
|
25
|
+
"VERSION",
|
|
26
|
+
"example_kissmetrics.yml",
|
|
27
|
+
"lib/simplekiss.rb",
|
|
28
|
+
"nbproject/private/config.properties",
|
|
29
|
+
"nbproject/private/private.properties",
|
|
30
|
+
"nbproject/private/rake-d.txt",
|
|
31
|
+
"nbproject/project.properties",
|
|
32
|
+
"nbproject/project.xml",
|
|
33
|
+
"rails/init.rb",
|
|
34
|
+
"simplekiss.gemspec",
|
|
35
|
+
"test/helper.rb",
|
|
36
|
+
"test/test_simplekiss.rb"
|
|
37
|
+
]
|
|
38
|
+
s.homepage = %q{http://github.com/hopeless/simplekiss}
|
|
39
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
|
40
|
+
s.require_paths = ["lib"]
|
|
41
|
+
s.rubygems_version = %q{1.3.5}
|
|
42
|
+
s.summary = %q{A simple library for adding KISSmetrics to your pages}
|
|
43
|
+
s.test_files = [
|
|
44
|
+
"test/helper.rb",
|
|
45
|
+
"test/test_simplekiss.rb"
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
if s.respond_to? :specification_version then
|
|
49
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
50
|
+
s.specification_version = 3
|
|
51
|
+
|
|
52
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
53
|
+
else
|
|
54
|
+
end
|
|
55
|
+
else
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
data/test/helper.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: simplekiss
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Jamie Lawrence
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
|
|
12
|
+
date: 2010-02-19 00:00:00 +00:00
|
|
13
|
+
default_executable:
|
|
14
|
+
dependencies: []
|
|
15
|
+
|
|
16
|
+
description: A simple library which adds KISSMetrics javascript to your pages, based on a YAML config file
|
|
17
|
+
email: jamie@shutterscouts.com
|
|
18
|
+
executables: []
|
|
19
|
+
|
|
20
|
+
extensions: []
|
|
21
|
+
|
|
22
|
+
extra_rdoc_files:
|
|
23
|
+
- LICENSE
|
|
24
|
+
- README.rdoc
|
|
25
|
+
files:
|
|
26
|
+
- .document
|
|
27
|
+
- .gitignore
|
|
28
|
+
- LICENSE
|
|
29
|
+
- README.rdoc
|
|
30
|
+
- Rakefile
|
|
31
|
+
- VERSION
|
|
32
|
+
- example_kissmetrics.yml
|
|
33
|
+
- lib/simplekiss.rb
|
|
34
|
+
- nbproject/private/config.properties
|
|
35
|
+
- nbproject/private/private.properties
|
|
36
|
+
- nbproject/private/rake-d.txt
|
|
37
|
+
- nbproject/project.properties
|
|
38
|
+
- nbproject/project.xml
|
|
39
|
+
- rails/init.rb
|
|
40
|
+
- simplekiss.gemspec
|
|
41
|
+
- test/helper.rb
|
|
42
|
+
- test/test_simplekiss.rb
|
|
43
|
+
has_rdoc: true
|
|
44
|
+
homepage: http://github.com/hopeless/simplekiss
|
|
45
|
+
licenses: []
|
|
46
|
+
|
|
47
|
+
post_install_message:
|
|
48
|
+
rdoc_options:
|
|
49
|
+
- --charset=UTF-8
|
|
50
|
+
require_paths:
|
|
51
|
+
- lib
|
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
53
|
+
requirements:
|
|
54
|
+
- - ">="
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: "0"
|
|
57
|
+
version:
|
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - ">="
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: "0"
|
|
63
|
+
version:
|
|
64
|
+
requirements: []
|
|
65
|
+
|
|
66
|
+
rubyforge_project:
|
|
67
|
+
rubygems_version: 1.3.5
|
|
68
|
+
signing_key:
|
|
69
|
+
specification_version: 3
|
|
70
|
+
summary: A simple library for adding KISSmetrics to your pages
|
|
71
|
+
test_files:
|
|
72
|
+
- test/helper.rb
|
|
73
|
+
- test/test_simplekiss.rb
|