clipster 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -20
- data/README.rdoc +53 -52
- data/Rakefile +34 -34
- data/app/assets/javascripts/clipster/application.js +15 -15
- data/app/assets/javascripts/clipster/bootstrap.js +2026 -2026
- data/app/assets/javascripts/clipster/bootstrap.min.js +5 -5
- data/app/assets/javascripts/clipster/clip.js +2 -2
- data/app/assets/javascripts/clipster/clips.js +2 -2
- data/app/assets/stylesheets/clipster/application.css +27 -15
- data/app/assets/stylesheets/clipster/bootstrap.css +5774 -5774
- data/app/assets/stylesheets/clipster/clip.css +21 -21
- data/app/assets/stylesheets/clipster/clips.css +4 -4
- data/app/controllers/clipster/application_controller.rb +7 -7
- data/app/controllers/clipster/clips_controller.rb +80 -67
- data/app/helpers/clipster/application_helper.rb +4 -4
- data/app/helpers/clipster/clip_helper.rb +4 -4
- data/app/helpers/clipster/clips_helper.rb +4 -4
- data/app/models/clipster/clip.rb +74 -23
- data/app/views/clipster/clips/about.html.erb +15 -0
- data/app/views/clipster/clips/create.html.erb +46 -36
- data/app/views/clipster/clips/expired.html.erb +1 -0
- data/app/views/clipster/clips/list.html.erb +43 -37
- data/app/views/clipster/clips/show.html.erb +7 -5
- data/app/views/kaminari/_first_page.html.erb +3 -0
- data/app/views/kaminari/_gap.html.erb +3 -0
- data/app/views/kaminari/_last_page.html.erb +3 -0
- data/app/views/kaminari/_next_page.html.erb +3 -0
- data/app/views/kaminari/_page.html.erb +3 -0
- data/app/views/kaminari/_paginator.html.erb +17 -0
- data/app/views/kaminari/_prev_page.html.erb +3 -0
- data/app/views/layouts/clipster/application.html.erb +49 -48
- data/config/routes.rb +14 -13
- data/config/schedule.rb +10 -0
- data/db/migrate/20121004010757_create_clipster_clips.rb +16 -16
- data/db/migrate/20121007154400_add_hash_index_to_clips.rb +13 -13
- data/db/migrate/20121007155125_populate_clip_defaults.rb +21 -21
- data/db/migrate/20121007162741_rename_hash_to_url_hash.rb +9 -9
- data/db/migrate/20121007223358_remove_default_from_language.rb +9 -9
- data/db/migrate/20121007223631_set_default_title_to_untitled.rb +9 -9
- data/db/migrate/20121105212724_add_lifespan_to_clips.rb +9 -0
- data/lib/clipster/engine.rb +15 -14
- data/lib/clipster/version.rb +3 -3
- data/lib/clipster.rb +4 -4
- data/lib/tasks/clipster_tasks.rake +4 -4
- metadata +46 -3
data/MIT-LICENSE
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
Copyright 2012 Kyle Bock
|
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.
|
1
|
+
Copyright 2012 Kyle Bock, Daniel White
|
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
CHANGED
@@ -1,53 +1,54 @@
|
|
1
|
-
= Clipster
|
2
|
-
|
3
|
-
{<img src="https://secure.travis-ci.org/kwbock/clipster.png" alt="Build Status" />}[http://travis-ci.org/kwbock/clipster]
|
4
|
-
|
5
|
-
Code snippets before they were cool.
|
6
|
-
|
7
|
-
An OpenSource Rails engine to add clipboard code sharing to your existing Ruby on Rails applications. Great for internal code sharing.
|
8
|
-
|
9
|
-
== Production
|
10
|
-
|
11
|
-
Add clipster to your Gemfile and then bundle install
|
12
|
-
|
13
|
-
gem 'clipster'
|
14
|
-
bundle install
|
15
|
-
|
16
|
-
or if you aren't using Bundler, run
|
17
|
-
|
18
|
-
gem install 'clipster'
|
19
|
-
|
20
|
-
Mount the Clipster Engine in your applcations routes.rb like follows.
|
21
|
-
|
22
|
-
mount Clipster::Engine, :at => '/clipster'
|
23
|
-
|
24
|
-
cd to your apps root and run
|
25
|
-
|
26
|
-
rake clipster:install:migrations && rake db:migrate
|
27
|
-
|
28
|
-
Restart your application and you should be able to access the engine at http://domain.tld/clipster
|
29
|
-
|
30
|
-
== Development
|
31
|
-
|
32
|
-
cd into your test application directory's lib folder and run the following
|
33
|
-
|
34
|
-
git clone https://github.com/kwbock/clipster.git
|
35
|
-
|
36
|
-
Add the following to your app's Gemfile
|
37
|
-
|
38
|
-
gem 'clipster', :path => './lib/clipster'
|
39
|
-
|
40
|
-
Add the following to your app's routes.rb
|
41
|
-
|
42
|
-
mount Clipster::Engine, :at => '/clipster'
|
43
|
-
|
44
|
-
cd to your apps root and run
|
45
|
-
|
46
|
-
rake clipster:install:migrations
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
1
|
+
= Clipster
|
2
|
+
|
3
|
+
{<img src="https://secure.travis-ci.org/kwbock/clipster.png" alt="Build Status" />}[http://travis-ci.org/kwbock/clipster]
|
4
|
+
|
5
|
+
Code snippets before they were cool.
|
6
|
+
|
7
|
+
An OpenSource Rails engine to add clipboard code sharing to your existing Ruby on Rails applications. Great for internal code sharing.
|
8
|
+
|
9
|
+
== Production
|
10
|
+
|
11
|
+
Add clipster to your Gemfile and then bundle install
|
12
|
+
|
13
|
+
gem 'clipster'
|
14
|
+
bundle install
|
15
|
+
|
16
|
+
or if you aren't using Bundler, run
|
17
|
+
|
18
|
+
gem install 'clipster'
|
19
|
+
|
20
|
+
Mount the Clipster Engine in your applcations routes.rb like follows.
|
21
|
+
|
22
|
+
mount Clipster::Engine, :at => '/clipster'
|
23
|
+
|
24
|
+
cd to your apps root and run
|
25
|
+
|
26
|
+
rake clipster:install:migrations && rake db:migrate
|
27
|
+
|
28
|
+
Restart your application and you should be able to access the engine at http://domain.tld/clipster
|
29
|
+
|
30
|
+
== Development
|
31
|
+
|
32
|
+
cd into your test application directory's lib folder and run the following
|
33
|
+
|
34
|
+
git clone https://github.com/kwbock/clipster.git
|
35
|
+
|
36
|
+
Add the following to your app's Gemfile
|
37
|
+
|
38
|
+
gem 'clipster', :path => './lib/clipster'
|
39
|
+
|
40
|
+
Add the following to your app's routes.rb
|
41
|
+
|
42
|
+
mount Clipster::Engine, :at => '/clipster'
|
43
|
+
|
44
|
+
cd to your apps root and run
|
45
|
+
|
46
|
+
rake clipster:install:migrations
|
47
|
+
rake db:migrate
|
48
|
+
|
49
|
+
Launch your server and navigate to https://localhost:3000/clipster to confirm the engine was mounted correctly
|
50
|
+
|
51
|
+
|
52
|
+
=== Todos
|
53
|
+
|
53
54
|
Look into adding authentication and user role handling, specifically the ability to tie clips to users. (targetting devise first)
|
data/Rakefile
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
begin
|
3
|
-
require 'bundler/setup'
|
4
|
-
rescue LoadError
|
5
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
-
end
|
7
|
-
begin
|
8
|
-
require 'rdoc/task'
|
9
|
-
rescue LoadError
|
10
|
-
require 'rdoc/rdoc'
|
11
|
-
require 'rake/rdoctask'
|
12
|
-
RDoc::Task = Rake::RDocTask
|
13
|
-
end
|
14
|
-
|
15
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
-
rdoc.rdoc_dir = 'rdoc'
|
17
|
-
rdoc.title = 'Clipster'
|
18
|
-
rdoc.options << '--line-numbers'
|
19
|
-
rdoc.rdoc_files.include('README.rdoc')
|
20
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
-
end
|
22
|
-
|
23
|
-
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
24
|
-
load 'rails/tasks/engine.rake'
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
Bundler::GemHelper.install_tasks
|
29
|
-
|
30
|
-
require 'rspec/core/rake_task'
|
31
|
-
RSpec::Core::RakeTask.new(:spec)
|
32
|
-
|
33
|
-
|
34
|
-
task :default => :spec
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'Clipster'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
Bundler::GemHelper.install_tasks
|
29
|
+
|
30
|
+
require 'rspec/core/rake_task'
|
31
|
+
RSpec::Core::RakeTask.new(:spec)
|
32
|
+
|
33
|
+
|
34
|
+
task :default => :spec
|
@@ -1,15 +1,15 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// the compiled file.
|
9
|
-
//
|
10
|
-
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
-
// GO AFTER THE REQUIRES BELOW.
|
12
|
-
//
|
13
|
-
//= require jquery
|
14
|
-
//= require jquery_ujs
|
15
|
-
//= require_tree .
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|