clipster 0.4.1 → 0.5.2
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/README.md +20 -4
- data/app/assets/flash/ZeroClipboard10.swf +0 -0
- data/app/assets/images/clipster/custom-clipboard.png +0 -0
- data/app/assets/images/clipster/git_hub.png +0 -0
- data/app/assets/javascripts/clipster/ZeroClipboard.min.js +3 -0
- data/app/assets/javascripts/clipster/{clip.js → about.js} +0 -0
- data/app/assets/javascripts/clipster/alertify.min.js +12 -0
- data/app/assets/javascripts/clipster/application.js +5 -0
- data/app/assets/javascripts/clipster/clips.js +2 -1
- data/app/assets/stylesheets/clipster/about.css +8 -0
- data/app/assets/stylesheets/clipster/alertify.css +155 -0
- data/app/assets/stylesheets/clipster/clips.css +81 -0
- data/app/controllers/clipster/about_controller.rb +8 -0
- data/app/controllers/clipster/clips_controller.rb +14 -31
- data/app/helpers/clipster/{clip_helper.rb → about_helper.rb} +1 -1
- data/app/helpers/clipster/application_helper.rb +4 -4
- data/app/models/clipster/clip.rb +5 -3
- data/app/views/clipster/about/index.html.erb +47 -0
- data/app/views/clipster/clips/{list.atom.builder → clips.atom.builder} +3 -5
- data/app/views/clipster/clips/{list.html.erb → clips.html.erb} +3 -9
- data/app/views/clipster/clips/{create.html.erb → new.html.erb} +37 -11
- data/app/views/clipster/clips/show.html.erb +24 -4
- data/app/views/clipster/clips/show.text.erb +1 -0
- data/app/views/clipster/common/_clip.html.erb +3 -0
- data/app/views/clipster/common/_includes.html.erb +1 -0
- data/app/views/clipster/common/_languages.html.erb +6 -0
- data/app/views/layouts/clipster/application.html.erb +10 -6
- data/config/routes.rb +6 -7
- data/config/schedule.rb +1 -1
- data/lib/clipster/engine.rb +2 -1
- data/lib/clipster/version.rb +1 -1
- data/lib/generators/clipster/install_generator.rb +3 -0
- data/lib/generators/templates/_includes.html.erb +1 -0
- metadata +23 -11
- data/app/assets/javascripts/clipster/bootstrap.js +0 -2027
- data/app/assets/stylesheets/clipster/clip.css +0 -32
- data/app/views/clipster/clips/about.html.erb +0 -15
| @@ -1,15 +1,15 @@ | |
| 1 1 | 
             
            module Clipster
         | 
| 2 2 | 
             
              module ApplicationHelper
         | 
| 3 | 
            -
                def  | 
| 3 | 
            +
                def supported_languages
         | 
| 4 4 | 
             
                  languages = CodeRay::Scanners.all_plugins
         | 
| 5 5 | 
             
                  languages.delete(CodeRay::Scanners::Raydebug)
         | 
| 6 6 | 
             
                  languages.delete(CodeRay::Scanners::Debug)
         | 
| 7 7 |  | 
| 8 | 
            -
                  languages
         | 
| 8 | 
            +
                  languages.sort{ |x,y| x.title <=> y.title } # sort by language title
         | 
| 9 9 | 
             
                end
         | 
| 10 10 |  | 
| 11 | 
            -
                def  | 
| 12 | 
            -
                  Clip.select("language, count(*) as count").group(:language)
         | 
| 11 | 
            +
                def language_counts
         | 
| 12 | 
            +
                  Clip.select("language, count(*) as count").public.group(:language)
         | 
| 13 13 | 
             
                end
         | 
| 14 14 |  | 
| 15 15 | 
             
                def display_user_text(user)
         | 
    
        data/app/models/clipster/clip.rb
    CHANGED
    
    | @@ -4,6 +4,8 @@ module Clipster | |
| 4 4 |  | 
| 5 5 | 
             
                before_create :default_values
         | 
| 6 6 |  | 
| 7 | 
            +
                self.primary_key = :id
         | 
| 8 | 
            +
             | 
| 7 9 | 
             
                attr_accessible :clip, :language, :title, :private, :expires, :lifespan
         | 
| 8 10 | 
             
                cattr_reader :lifespans
         | 
| 9 11 | 
             
                cattr_accessor :current_user, :lifespan
         | 
| @@ -16,15 +18,15 @@ module Clipster | |
| 16 18 | 
             
                # Define all supported lifespans and their time offset
         | 
| 17 19 | 
             
                @@lifespans = [["Forever", nil],
         | 
| 18 20 | 
             
                               ["An Hour", :hours=>1],
         | 
| 19 | 
            -
                               ["A Week", :days=>7],
         | 
| 20 21 | 
             
                               ["A Day", :days=>1],
         | 
| 22 | 
            +
                               ["A Week", :days=>7],
         | 
| 21 23 | 
             
                               ["A Month", :months=>1],
         | 
| 22 24 | 
             
                               ["A Year", :years=>1]]
         | 
| 23 25 |  | 
| 24 26 | 
             
                # TODO: build more powerful search term creation
         | 
| 25 27 | 
             
                scope :search, lambda {|term|
         | 
| 26 28 | 
             
                  where("(title LIKE :term or language LIKE :term or clip LIKE :term) and (expires is null OR expires > :now)",{
         | 
| 27 | 
            -
                      :term => term,
         | 
| 29 | 
            +
                      :term => "#{term}%".gsub('*','%').gsub(/%+/, '%'),
         | 
| 28 30 | 
             
                      :now => DateTime.now
         | 
| 29 31 | 
             
                  })
         | 
| 30 32 | 
             
                }
         | 
| @@ -73,7 +75,7 @@ module Clipster | |
| 73 75 | 
             
                end
         | 
| 74 76 |  | 
| 75 77 | 
             
                # Utility method called by either cron job or when an expired clip is accessed
         | 
| 76 | 
            -
                def Clip. | 
| 78 | 
            +
                def Clip.delete_expired
         | 
| 77 79 | 
             
                  Clip.destroy_all(["expires is not null AND expires <= ?", DateTime.now])
         | 
| 78 80 | 
             
                end
         | 
| 79 81 |  | 
| @@ -0,0 +1,47 @@ | |
| 1 | 
            +
            <legend>About Clipster v<%=Gem.searcher.find("clipster").version unless Gem.searcher.find("clipster").nil?%></legend>
         | 
| 2 | 
            +
             | 
| 3 | 
            +
             | 
| 4 | 
            +
            <div class="span9">
         | 
| 5 | 
            +
              <div class="span9">
         | 
| 6 | 
            +
                <p>Clipster is an Open Source Rails engine to add clipboard code sharing to your existing Ruby on Rails applications. Complete with syntax highlighting and expiring clips, its great for internal code sharing. Please visit us on <%= link_to("GitHub", "http://github.com/kwbock/clipster") %> for downloads and support.</p>
         | 
| 7 | 
            +
              </div>
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              <div class="well span9">
         | 
| 10 | 
            +
                <p>Copyright 2012 Kyle Bock, Daniel White</p>
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
         | 
| 17 | 
            +
              </div>
         | 
| 18 | 
            +
            </div>
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            <div class="developers span2 pull-right">
         | 
| 21 | 
            +
              <h5>Source Code</h5>
         | 
| 22 | 
            +
                <p>
         | 
| 23 | 
            +
                  <a href="https://github.com/kwbock/clipster">
         | 
| 24 | 
            +
                    GitHub<br \>
         | 
| 25 | 
            +
                    <%= image_tag("clipster/git_hub.png",
         | 
| 26 | 
            +
                                  :alt=>"GitHub",
         | 
| 27 | 
            +
                                  :class=>"img-polaroid",
         | 
| 28 | 
            +
                                  :width=>80,
         | 
| 29 | 
            +
                                  :height=>80) %></a></p>
         | 
| 30 | 
            +
              <h5>Developers</h5>
         | 
| 31 | 
            +
                <p>
         | 
| 32 | 
            +
                  <a href="https://github.com/kwbock">
         | 
| 33 | 
            +
                    Kyle Bock<br \>
         | 
| 34 | 
            +
                    <%= image_tag("https://secure.gravatar.com/avatar/9ed5367a28f94871e15a428712d595b0",
         | 
| 35 | 
            +
                                  :alt=>"Kyle Bock",
         | 
| 36 | 
            +
                                  :class=>"img-polaroid",
         | 
| 37 | 
            +
                                  :width=>80,
         | 
| 38 | 
            +
                                  :height=>80) %></a></p>
         | 
| 39 | 
            +
                <p>
         | 
| 40 | 
            +
                  <a href="https://github.com/lightswitch05">
         | 
| 41 | 
            +
                    Daniel White<br \>
         | 
| 42 | 
            +
                    <%=image_tag("https://secure.gravatar.com/avatar/6e12977acc1600c0f367d6d7b9265f95",
         | 
| 43 | 
            +
                                 :alt=>"Daniel White",
         | 
| 44 | 
            +
                                 :class=>"img-polaroid",
         | 
| 45 | 
            +
                                 :width=>80,
         | 
| 46 | 
            +
                                 :height=>80)%></a></p>
         | 
| 47 | 
            +
            </div>
         | 
| @@ -4,14 +4,12 @@ atom_feed do |feed| | |
| 4 4 |  | 
| 5 5 | 
             
              @clips.each do |clip|
         | 
| 6 6 | 
             
                feed.entry(clip) do |entry|
         | 
| 7 | 
            -
                  entry.title(clip.title)
         | 
| 8 7 | 
             
                  if clip.expires.nil?
         | 
| 9 | 
            -
                    entry. | 
| 8 | 
            +
                    entry.title("#{clip.title}. A #{clip.language} clip that never expires.")
         | 
| 10 9 | 
             
                  else
         | 
| 11 | 
            -
                    entry. | 
| 10 | 
            +
                    entry.title("#{clip.title}. A #{clip.language} clip that expires on #{clip.expires}.")
         | 
| 12 11 | 
             
                  end
         | 
| 13 | 
            -
                  entry. | 
| 14 | 
            -
                  entry.content(clip.div.html_safe, :type => 'html')
         | 
| 12 | 
            +
                  entry.content('<div class="clip">' + clip.div.html_safe + '</div>', :type => 'html')
         | 
| 15 13 |  | 
| 16 14 | 
             
                  #TODO set author once user integration is compleate
         | 
| 17 15 | 
             
                  #entry.author do |author|
         | 
| @@ -2,7 +2,7 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            <legend>
         | 
| 4 4 | 
             
                    Recent Clips<%= " - #{params[:lang]}" unless params[:lang].nil? %>
         | 
| 5 | 
            -
                    <%= link_to "",  | 
| 5 | 
            +
                    <%= link_to "", clips_clips_path(:lang => params[:lang], :format=>:atom), :class=>"image-feed pull-right" %>
         | 
| 6 6 | 
             
            </legend>
         | 
| 7 7 | 
             
            <div class="span7">
         | 
| 8 8 | 
             
                <table class="table table-striped table-bordered table-hover span6">
         | 
| @@ -43,7 +43,7 @@ | |
| 43 43 | 
             
                        <% end %>
         | 
| 44 44 | 
             
                        <% unless @clips.length > 0 %>
         | 
| 45 45 | 
             
                        <tr>
         | 
| 46 | 
            -
                            <td colspan=" | 
| 46 | 
            +
                            <td colspan="100%" style="text-align: center;">There are no public clips.</td>
         | 
| 47 47 | 
             
                        </tr>
         | 
| 48 48 | 
             
                        <% end %>
         | 
| 49 49 | 
             
                    </tbody>
         | 
| @@ -52,10 +52,4 @@ | |
| 52 52 | 
             
                <%= paginate @clips %>
         | 
| 53 53 | 
             
            </div>
         | 
| 54 54 |  | 
| 55 | 
            -
             | 
| 56 | 
            -
            <aside class="languages bordered span3 offset1">
         | 
| 57 | 
            -
                <div class="title">Languages</div>
         | 
| 58 | 
            -
                <% get_language_counts.each do |lang| %>
         | 
| 59 | 
            -
                <div><%= link_to lang.language, list_clips_path(:lang => lang.language) %> (<%= lang.count %>)</div>
         | 
| 60 | 
            -
                <% end %>
         | 
| 61 | 
            -
            </aside>
         | 
| 55 | 
            +
            <%= render "clipster/common/languages" %>
         | 
| @@ -1,8 +1,22 @@ | |
| 1 | 
            +
            <script type="text/javascript">
         | 
| 2 | 
            +
              $(function() {
         | 
| 3 | 
            +
                $("#tabs a").click(function (e) {
         | 
| 4 | 
            +
                  e.preventDefault();
         | 
| 5 | 
            +
                  $(this).tab('show');
         | 
| 6 | 
            +
                });
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                $('#tabs a#preview_label').bind('click', function(e) {
         | 
| 9 | 
            +
                  $.post("<%= preview_clips_path %>", $("#new_clip").serialize(), function(data, textStatus, jqXHR) {
         | 
| 10 | 
            +
                    $("#preview").html(data);
         | 
| 11 | 
            +
                  })
         | 
| 12 | 
            +
                });
         | 
| 13 | 
            +
              });
         | 
| 14 | 
            +
            </script>
         | 
| 1 15 | 
             
            <legend>New Clip</legend>
         | 
| 2 16 |  | 
| 3 17 | 
             
            <%= form_for(@clip, :url => { :action => "create" }) do |f| %>
         | 
| 4 18 | 
             
              <%= f.error_messages %>
         | 
| 5 | 
            -
             | 
| 19 | 
            +
             | 
| 6 20 | 
             
              <!-- 1st Row -->
         | 
| 7 21 | 
             
              <div class="span5 offset1">
         | 
| 8 22 | 
             
                <!-- title -->
         | 
| @@ -12,17 +26,17 @@ | |
| 12 26 | 
             
                  <%= f.text_field(:title, :value => @clip.title, :required=>"required") %>
         | 
| 13 27 | 
             
                </div>
         | 
| 14 28 | 
             
                <!-- /title -->
         | 
| 15 | 
            -
             | 
| 29 | 
            +
             | 
| 16 30 | 
             
                <!-- language -->
         | 
| 17 31 | 
             
                <div class="span4 no-left">
         | 
| 18 32 | 
             
                  <div class="help-tip">
         | 
| 19 33 | 
             
                    <%= f.label(:language) %> <i class="icon-question-sign" data-title="Choose a language for syntax highlighting"></i></div>
         | 
| 20 | 
            -
                  <%= f.collection_select("language",  | 
| 34 | 
            +
                  <%= f.collection_select("language", supported_languages, :lang, :title, :selected => (@clip.language || "text")) %>
         | 
| 21 35 | 
             
                </div>
         | 
| 22 36 | 
             
                <!-- /language -->
         | 
| 23 37 | 
             
              </div>
         | 
| 24 38 | 
             
              <!-- /1st Row -->
         | 
| 25 | 
            -
             | 
| 39 | 
            +
             | 
| 26 40 | 
             
              <!-- 2nd Row -->
         | 
| 27 41 | 
             
              <div class="span5 offset1 pull-right no-left">
         | 
| 28 42 | 
             
                <!-- lifespan -->
         | 
| @@ -32,7 +46,7 @@ | |
| 32 46 | 
             
                  <%= f.select(:lifespan, @clip.lifespans, :selected=>(@clip.lifespan || "Forever")) %>
         | 
| 33 47 | 
             
                </div>
         | 
| 34 48 | 
             
                <!-- /lifespan -->
         | 
| 35 | 
            -
             | 
| 49 | 
            +
             | 
| 36 50 | 
             
                <!-- private -->
         | 
| 37 51 | 
             
                <div class="span4">
         | 
| 38 52 | 
             
                  <div class="help-tip">
         | 
| @@ -42,15 +56,27 @@ | |
| 42 56 | 
             
                <!-- /private -->
         | 
| 43 57 | 
             
              </div>
         | 
| 44 58 | 
             
              <!-- /2nd Row -->
         | 
| 45 | 
            -
              
         | 
| 59 | 
            +
              <div class="span10 offset1 ">
         | 
| 60 | 
            +
                <ul id="tabs" class="nav nav-tabs">
         | 
| 61 | 
            +
                  <li class="active"><a href="#code" data-toggle="tab">Code</a></li>
         | 
| 62 | 
            +
                  <li><a href="#preview" id="preview_label" data-toggle="tab">Preview</a></li>
         | 
| 63 | 
            +
                </ul>
         | 
| 64 | 
            +
                <div class="tab-content">
         | 
| 65 | 
            +
                  <div id="code" class="tab-pane active">
         | 
| 66 | 
            +
                    <div class="help-tip">
         | 
| 67 | 
            +
                      <%= f.label(:clip) %> <i class="icon-question-sign" data-title="The main content to be shared"></i>
         | 
| 68 | 
            +
                    </div>
         | 
| 69 | 
            +
                    <%= f.text_area(:clip, :class=>"span10", :rows=>"15", :value => @clip.clip, :required=>"required") %>
         | 
| 70 | 
            +
                  </div>
         | 
| 71 | 
            +
                  <div id="preview" class="tab-pane"></div><!-- ajax loaded preview content -->
         | 
| 72 | 
            +
                </div>
         | 
| 73 | 
            +
              </div>
         | 
| 46 74 | 
             
              <!-- clip -->
         | 
| 47 | 
            -
              <div class=" | 
| 48 | 
            -
             | 
| 49 | 
            -
                  <%= f.label(:clip) %> <i class="icon-question-sign" data-title="The main content to be shared"></i></div>
         | 
| 50 | 
            -
                <%= f.text_area(:clip, :class=>"span10", :rows=>"15", :value => @clip.clip, :required=>"required") %>
         | 
| 75 | 
            +
              <div class="tab-content">
         | 
| 76 | 
            +
             | 
| 51 77 | 
             
              </div>
         | 
| 52 78 | 
             
              <!-- /clip -->
         | 
| 53 | 
            -
             | 
| 79 | 
            +
             | 
| 54 80 | 
             
              <div class="span2 pull-right">
         | 
| 55 81 | 
             
                <%= f.submit(:class=>"btn btn-primary") %>
         | 
| 56 82 | 
             
              </div>
         | 
| @@ -1,8 +1,28 @@ | |
| 1 1 | 
             
            <legend>
         | 
| 2 2 | 
             
              <div class="span10"><%=@clip.title %></div>
         | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 3 | 
            +
              <div class="span3 secondary">A <%=@clip.language.capitalize %> clip</div>
         | 
| 4 | 
            +
              <div class="span5 secondary">Expires: <%= @clip.expires_in_words %></div>
         | 
| 5 | 
            +
              <div id="button-container" class="pull-right secondary btn-group" style="position:relative">
         | 
| 6 | 
            +
                <%=link_to({:format=>:text},{:action=>"show", :class=>"btn btn-mini"}) do %>
         | 
| 7 | 
            +
                  <i class='icon-file'></i>
         | 
| 8 | 
            +
                <%end%>
         | 
| 9 | 
            +
                <button id="copy-button" class="btn btn-mini"> <i class='icon-copy'></i></button>
         | 
| 10 | 
            +
              </div>
         | 
| 11 | 
            +
              <div class="clearfix"></div>
         | 
| 6 12 | 
             
            </legend>
         | 
| 7 13 | 
             
            <div class="clearfix"></div>
         | 
| 8 | 
            -
             | 
| 14 | 
            +
             | 
| 15 | 
            +
            <%= render "clipster/common/clip", :object => @clip %>
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            <script type="text/javascript">
         | 
| 18 | 
            +
                $(document).ready(function () {
         | 
| 19 | 
            +
                    ZeroClipboard.setMoviePath("<%= asset_path('ZeroClipboard10.swf') %>");
         | 
| 20 | 
            +
                    var clip = new ZeroClipboard.Client();
         | 
| 21 | 
            +
                    clip.setText("<%= escape_javascript(@clip.clip.html_safe) %>");
         | 
| 22 | 
            +
                    clip.addEventListener( 'onComplete', function(){ 
         | 
| 23 | 
            +
                        alertify.log("Clip successfully copied");
         | 
| 24 | 
            +
                    });
         | 
| 25 | 
            +
                    //attach to button
         | 
| 26 | 
            +
                    clip.glue( 'copy-button', 'button-container' );
         | 
| 27 | 
            +
                });
         | 
| 28 | 
            +
            </script>
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            <%= @clip.clip.html_safe %>
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            <!-- Insert any HTML here that you wish to include in the <head> of all clipster pages -->
         | 
| @@ -7,6 +7,7 @@ | |
| 7 7 | 
             
              <%= javascript_include_tag "clipster/application" %>
         | 
| 8 8 | 
             
              <%= csrf_meta_tags %>
         | 
| 9 9 | 
             
              <%=h yield(:head) %>
         | 
| 10 | 
            +
              <%= render "clipster/common/includes" %>
         | 
| 10 11 | 
             
            </head>
         | 
| 11 12 | 
             
            <body>
         | 
| 12 13 | 
             
                <div class="container">
         | 
| @@ -17,17 +18,20 @@ | |
| 17 18 | 
             
                                    <%= link_to "Clipster", root_path, :class => "brand" %>
         | 
| 18 19 | 
             
                                    <ul class="nav">
         | 
| 19 20 | 
             
                                        <li><%= link_to "New Clip", new_clip_path %></li>
         | 
| 20 | 
            -
                                        <li><%= link_to "Recent Clips",  | 
| 21 | 
            -
                                        <li><%= link_to "About",  | 
| 21 | 
            +
                                        <li><%= link_to "Recent Clips", clips_clips_path %></li>
         | 
| 22 | 
            +
                                        <li><%= link_to "About", about_index_path %></li>
         | 
| 22 23 | 
             
                                        <% if Clipster.config.associates_clip_with_user %>
         | 
| 23 24 | 
             
                                        <li><a href="javascript:void(0);"><%= Clipster.config.user_class %></a></li>
         | 
| 24 25 | 
             
                                        <% end %>
         | 
| 25 26 | 
             
                                    </ul>
         | 
| 26 | 
            -
                                     | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 27 | 
            +
                                    <%= form_tag(search_clips_path, :method => 'get', :class => 'navbar-search pull-right', :name=>"search_form") do %>
         | 
| 28 | 
            +
                                        <div class="input-append">
         | 
| 29 | 
            +
                                            <%= text_field_tag(:search_term, "", :class=>"search-query", :type=>"search", :placeholder=>"Search") %>
         | 
| 30 | 
            +
                                            <span class="add-on">
         | 
| 31 | 
            +
                                            <i class="icon-search"> </i></span>
         | 
| 32 | 
            +
                                        </div>
         | 
| 33 | 
            +
                                        <input id="search_button" type="submit" style="display:none;" />
         | 
| 29 34 | 
             
                                    <% end %>
         | 
| 30 | 
            -
             | 
| 31 35 | 
             
                                </div>
         | 
| 32 36 | 
             
                            </div>
         | 
| 33 37 | 
             
                        </div>
         | 
    
        data/config/routes.rb
    CHANGED
    
    | @@ -1,16 +1,15 @@ | |
| 1 1 | 
             
            Clipster::Engine.routes.draw do
         | 
| 2 2 |  | 
| 3 3 | 
             
              resources :users, :only => :show
         | 
| 4 | 
            -
               | 
| 4 | 
            +
              resources :about, :only => :index
         | 
| 5 5 |  | 
| 6 | 
            -
              resources :clips, :path => "/" do
         | 
| 6 | 
            +
              resources :clips, :path => "/", :only=> [:create, :new, :show] do
         | 
| 7 7 | 
             
                collection do
         | 
| 8 | 
            -
                  get ' | 
| 9 | 
            -
                  get ' | 
| 10 | 
            -
                   | 
| 11 | 
            -
                  get 'about', :action => :about
         | 
| 8 | 
            +
                  get 'search'
         | 
| 9 | 
            +
                  get 'clips'
         | 
| 10 | 
            +
                  post 'preview'
         | 
| 12 11 | 
             
                end
         | 
| 13 12 | 
             
              end
         | 
| 14 13 |  | 
| 15 | 
            -
              root :to =>  | 
| 14 | 
            +
              root :to => "clips#new"
         | 
| 16 15 | 
             
            end
         | 
    
        data/config/schedule.rb
    CHANGED
    
    
    
        data/lib/clipster/engine.rb
    CHANGED
    
    | @@ -8,8 +8,9 @@ module Clipster | |
| 8 8 |  | 
| 9 9 | 
             
                # so we can use rspec generators
         | 
| 10 10 | 
             
                config.generators do |g|
         | 
| 11 | 
            -
                  g.test_framework :rspec
         | 
| 11 | 
            +
                  g.test_framework :rspec, :fixture => false
         | 
| 12 12 | 
             
                  g.integration_tool :rspec
         | 
| 13 | 
            +
                  g.fixture_replacement :factory_girl, :dir=>"spec/factories"
         | 
| 13 14 | 
             
                end
         | 
| 14 15 | 
             
              end
         | 
| 15 16 |  | 
    
        data/lib/clipster/version.rb
    CHANGED
    
    
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            <!-- Insert any HTML here that you wish to include in the <head> of all clipster pages -->
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: clipster
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.5.2
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -10,7 +10,7 @@ authors: | |
| 10 10 | 
             
            autorequire: 
         | 
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date: 2012- | 
| 13 | 
            +
            date: 2012-12-10 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: rails
         | 
| @@ -147,34 +147,44 @@ executables: [] | |
| 147 147 | 
             
            extensions: []
         | 
| 148 148 | 
             
            extra_rdoc_files: []
         | 
| 149 149 | 
             
            files:
         | 
| 150 | 
            +
            - app/assets/flash/ZeroClipboard10.swf
         | 
| 151 | 
            +
            - app/assets/images/clipster/custom-clipboard.png
         | 
| 152 | 
            +
            - app/assets/images/clipster/git_hub.png
         | 
| 150 153 | 
             
            - app/assets/images/clipster/glyphicons-halflings-white.png
         | 
| 151 154 | 
             
            - app/assets/images/clipster/glyphicons-halflings.png
         | 
| 152 155 | 
             
            - app/assets/images/clipster/rss_logo_small.png
         | 
| 156 | 
            +
            - app/assets/javascripts/clipster/about.js
         | 
| 157 | 
            +
            - app/assets/javascripts/clipster/alertify.min.js
         | 
| 153 158 | 
             
            - app/assets/javascripts/clipster/application.js
         | 
| 154 | 
            -
            - app/assets/javascripts/clipster/bootstrap.js
         | 
| 155 159 | 
             
            - app/assets/javascripts/clipster/bootstrap.min.js
         | 
| 156 | 
            -
            - app/assets/javascripts/clipster/clip.js
         | 
| 157 160 | 
             
            - app/assets/javascripts/clipster/clips.js
         | 
| 158 161 | 
             
            - app/assets/javascripts/clipster/users.js
         | 
| 162 | 
            +
            - app/assets/javascripts/clipster/ZeroClipboard.min.js
         | 
| 163 | 
            +
            - app/assets/stylesheets/clipster/about.css
         | 
| 164 | 
            +
            - app/assets/stylesheets/clipster/alertify.css
         | 
| 159 165 | 
             
            - app/assets/stylesheets/clipster/application.css
         | 
| 160 166 | 
             
            - app/assets/stylesheets/clipster/bootstrap.css
         | 
| 161 | 
            -
            - app/assets/stylesheets/clipster/clip.css
         | 
| 162 167 | 
             
            - app/assets/stylesheets/clipster/clips.css
         | 
| 163 168 | 
             
            - app/assets/stylesheets/clipster/users.css
         | 
| 169 | 
            +
            - app/controllers/clipster/about_controller.rb
         | 
| 164 170 | 
             
            - app/controllers/clipster/application_controller.rb
         | 
| 165 171 | 
             
            - app/controllers/clipster/clips_controller.rb
         | 
| 166 172 | 
             
            - app/controllers/clipster/users_controller.rb
         | 
| 173 | 
            +
            - app/helpers/clipster/about_helper.rb
         | 
| 167 174 | 
             
            - app/helpers/clipster/application_helper.rb
         | 
| 168 175 | 
             
            - app/helpers/clipster/clips_helper.rb
         | 
| 169 | 
            -
            - app/helpers/clipster/clip_helper.rb
         | 
| 170 176 | 
             
            - app/helpers/clipster/users_helper.rb
         | 
| 171 177 | 
             
            - app/models/clipster/clip.rb
         | 
| 172 | 
            -
            - app/views/clipster/ | 
| 173 | 
            -
            - app/views/clipster/clips/ | 
| 178 | 
            +
            - app/views/clipster/about/index.html.erb
         | 
| 179 | 
            +
            - app/views/clipster/clips/clips.atom.builder
         | 
| 180 | 
            +
            - app/views/clipster/clips/clips.html.erb
         | 
| 174 181 | 
             
            - app/views/clipster/clips/expired.html.erb
         | 
| 175 | 
            -
            - app/views/clipster/clips/ | 
| 176 | 
            -
            - app/views/clipster/clips/list.html.erb
         | 
| 182 | 
            +
            - app/views/clipster/clips/new.html.erb
         | 
| 177 183 | 
             
            - app/views/clipster/clips/show.html.erb
         | 
| 184 | 
            +
            - app/views/clipster/clips/show.text.erb
         | 
| 185 | 
            +
            - app/views/clipster/common/_clip.html.erb
         | 
| 186 | 
            +
            - app/views/clipster/common/_includes.html.erb
         | 
| 187 | 
            +
            - app/views/clipster/common/_languages.html.erb
         | 
| 178 188 | 
             
            - app/views/clipster/users/index.html.erb
         | 
| 179 189 | 
             
            - app/views/clipster/users/show.html.erb
         | 
| 180 190 | 
             
            - app/views/kaminari/_first_page.html.erb
         | 
| @@ -195,12 +205,14 @@ files: | |
| 195 205 | 
             
            - lib/clipster.rb
         | 
| 196 206 | 
             
            - lib/generators/clipster/install_generator.rb
         | 
| 197 207 | 
             
            - lib/generators/templates/clipster.rb
         | 
| 208 | 
            +
            - lib/generators/templates/_includes.html.erb
         | 
| 198 209 | 
             
            - lib/tasks/clipster_tasks.rake
         | 
| 199 210 | 
             
            - MIT-LICENSE
         | 
| 200 211 | 
             
            - Rakefile
         | 
| 201 212 | 
             
            - README.md
         | 
| 202 213 | 
             
            homepage: http://github.com/kwbock/clipster
         | 
| 203 | 
            -
            licenses: | 
| 214 | 
            +
            licenses:
         | 
| 215 | 
            +
            - MIT
         | 
| 204 216 | 
             
            post_install_message: 
         | 
| 205 217 | 
             
            rdoc_options: []
         | 
| 206 218 | 
             
            require_paths:
         |