clipster 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +47 -0
- data/Rakefile +40 -0
- data/app/assets/images/clipster/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/clipster/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/clipster/application.js +15 -0
- data/app/assets/javascripts/clipster/bootstrap.js +2027 -0
- data/app/assets/javascripts/clipster/bootstrap.min.js +6 -0
- data/app/assets/javascripts/clipster/clip.js +2 -0
- data/app/assets/stylesheets/clipster/application.css +16 -0
- data/app/assets/stylesheets/clipster/bootstrap.css +5774 -0
- data/app/assets/stylesheets/clipster/clip.css +4 -0
- data/app/controllers/clipster/application_controller.rb +7 -0
- data/app/controllers/clipster/clips_controller.rb +41 -0
- data/app/helpers/clipster/application_helper.rb +4 -0
- data/app/helpers/clipster/clip_helper.rb +4 -0
- data/app/models/clipster/clip.rb +15 -0
- data/app/views/clipster/clips/create.html.erb +37 -0
- data/app/views/clipster/clips/list.html.erb +33 -0
- data/app/views/clipster/clips/show.html.erb +6 -0
- data/app/views/layouts/clipster/application.html.erb +43 -0
- data/config/routes.rb +8 -0
- data/db/migrate/20121004010757_create_clipster_clips.rb +16 -0
- data/db/migrate/20121007154400_add_hash_index_to_clips.rb +13 -0
- data/db/migrate/20121007155125_populate_clip_defaults.rb +21 -0
- data/db/migrate/20121007162741_rename_hash_to_url_hash.rb +9 -0
- data/db/migrate/20121007223358_remove_default_from_language.rb +9 -0
- data/db/migrate/20121007223631_set_default_title_to_untitled.rb +9 -0
- data/lib/clipster/engine.rb +8 -0
- data/lib/clipster/version.rb +3 -0
- data/lib/clipster.rb +4 -0
- data/lib/tasks/clipster_tasks.rake +4 -0
- data/test/clipster_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/log/development.log +1 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/fixtures/clipster/clips.yml +11 -0
- data/test/functional/clipster/clip_controller_test.rb +9 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/clipster/clip_test.rb +9 -0
- data/test/unit/helpers/clipster/clip_helper_test.rb +6 -0
- metadata +236 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +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.
|
data/README.rdoc
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
= Clipster
|
2
|
+
|
3
|
+
Code snippets before they were cool.
|
4
|
+
|
5
|
+
An OpenSource Rails engine to add clipboard code sharing to your existing Ruby on Rails applications. Great for internal code sharing.
|
6
|
+
|
7
|
+
== Production
|
8
|
+
|
9
|
+
Add clipster to your Gemfile and then bundle install
|
10
|
+
|
11
|
+
gem 'clipster'
|
12
|
+
bundle install
|
13
|
+
|
14
|
+
or if you aren't using Bundler, run
|
15
|
+
|
16
|
+
gem install 'clipster'
|
17
|
+
|
18
|
+
Mount the Clipster Engine in your applcations routes.rb like follows.
|
19
|
+
|
20
|
+
mount Clipster::Engine, :at => '/clipster'
|
21
|
+
|
22
|
+
Restart your application and you should be able to access the engine at http://domain.tld/clipster
|
23
|
+
|
24
|
+
== Development
|
25
|
+
|
26
|
+
cd into your test application directory's lib folder and run the following
|
27
|
+
|
28
|
+
git clone https://github.com/kwbock/clipster.git
|
29
|
+
|
30
|
+
Add the following to your app's Gemfile
|
31
|
+
|
32
|
+
gem 'clipster', :path => './lib/clipster'
|
33
|
+
|
34
|
+
Add the following to your app's routes.rb
|
35
|
+
|
36
|
+
mount Clipster::Engine, :at => '/clipster'
|
37
|
+
|
38
|
+
cd to your apps root and run
|
39
|
+
|
40
|
+
rake clipster:install:migrations && rake db:migrate
|
41
|
+
|
42
|
+
Launch your server and navigate to https://localhost:3000/clipster to confirm the engine was mounted correctly
|
43
|
+
|
44
|
+
|
45
|
+
=== Todos
|
46
|
+
|
47
|
+
Look into adding authentication and user role handling, specifically the ability to tie clips to users. (targetting devise first)
|
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
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("../test/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
Bundler::GemHelper.install_tasks
|
29
|
+
|
30
|
+
require 'rake/testtask'
|
31
|
+
|
32
|
+
Rake::TestTask.new(:test) do |t|
|
33
|
+
t.libs << 'lib'
|
34
|
+
t.libs << 'test'
|
35
|
+
t.pattern = 'test/**/*_test.rb'
|
36
|
+
t.verbose = false
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
task :default => :test
|
Binary file
|
Binary file
|
@@ -0,0 +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 .
|