copy 0.0.2 → 0.0.3
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 +1 -1
- data/bin/copy +8 -3
- data/copy.gemspec +0 -1
- data/lib/copy/admin/copy.css +1 -1
- data/lib/copy/admin/index.js.erb +11 -1
- data/lib/copy/generators/site/config.ru +6 -1
- data/lib/copy/version.rb +1 -1
- metadata +5 -19
    
        data/README.md
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            ## Copy is a sinatra-based content management system.
         | 
| 2 2 |  | 
| 3 | 
            -
            Copy is similar to [Brochure](https://github.com/sstephenson/brochure) in spirit, but with the  | 
| 3 | 
            +
            Copy is similar to [Brochure](https://github.com/sstephenson/brochure) in spirit, but with the addition of editable text blocks.
         | 
| 4 4 |  | 
| 5 5 | 
             
            More soon.
         | 
| 6 6 |  | 
    
        data/bin/copy
    CHANGED
    
    | @@ -1,9 +1,14 @@ | |
| 1 1 | 
             
            #!/usr/bin/env ruby
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 4 | 
            -
            require ' | 
| 5 | 
            -
             | 
| 3 | 
            +
            begin
         | 
| 4 | 
            +
              require 'copy'
         | 
| 5 | 
            +
            rescue LoadError
         | 
| 6 | 
            +
              require 'rubygems'
         | 
| 7 | 
            +
              require 'copy'
         | 
| 8 | 
            +
            end
         | 
| 9 | 
            +
             | 
| 6 10 | 
             
            require 'copy/version'
         | 
| 11 | 
            +
            require 'optparse'
         | 
| 7 12 |  | 
| 8 13 | 
             
            OptionParser.new do |opts|
         | 
| 9 14 | 
             
              opts.banner = "Usage: copy [options]"
         | 
    
        data/copy.gemspec
    CHANGED
    
    
    
        data/lib/copy/admin/copy.css
    CHANGED
    
    
    
        data/lib/copy/admin/index.js.erb
    CHANGED
    
    | @@ -4,6 +4,15 @@ jQuery.noConflict(); | |
| 4 4 |  | 
| 5 5 | 
             
            (function($) { 
         | 
| 6 6 | 
             
              $(function() {
         | 
| 7 | 
            +
                // Short-circuit if this has run already (bookmarklet clicked twice).
         | 
| 8 | 
            +
                if (window._copy_initialized) {
         | 
| 9 | 
            +
                  // Make the blocks clickable unless the Copy dialog is present.
         | 
| 10 | 
            +
                  if ($('#_copy').length == 0) {
         | 
| 11 | 
            +
                    clickable();
         | 
| 12 | 
            +
                  }
         | 
| 13 | 
            +
                  return true;
         | 
| 14 | 
            +
                }
         | 
| 15 | 
            +
                
         | 
| 7 16 | 
             
                function clickable() {
         | 
| 8 17 | 
             
                  $('._copy_editable').addClass('_copy_clickable');
         | 
| 9 18 | 
             
                }
         | 
| @@ -12,7 +21,7 @@ jQuery.noConflict(); | |
| 12 21 | 
             
                  $('._copy_editable').removeClass('_copy_clickable');
         | 
| 13 22 | 
             
                }
         | 
| 14 23 |  | 
| 15 | 
            -
                $('head').append('<style | 
| 24 | 
            +
                $('head').append('<style><%= File.read(settings.root + '/admin/copy.css').gsub(/\n/, " \\\n") %></style>');
         | 
| 16 25 |  | 
| 17 26 | 
             
                $('._copy_clickable').live('click', function() {
         | 
| 18 27 | 
             
                  var copy = $(this);
         | 
| @@ -49,5 +58,6 @@ jQuery.noConflict(); | |
| 49 58 | 
             
                })
         | 
| 50 59 |  | 
| 51 60 | 
             
                clickable();
         | 
| 61 | 
            +
                window._copy_initialized = true;
         | 
| 52 62 | 
             
              });
         | 
| 53 63 | 
             
            })(jQuery);
         | 
    
        data/lib/copy/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: copy
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 25
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 0
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.0. | 
| 9 | 
            +
              - 3
         | 
| 10 | 
            +
              version: 0.0.3
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Javan Makhmali
         | 
| @@ -48,24 +48,10 @@ dependencies: | |
| 48 48 | 
             
                    version: "0"
         | 
| 49 49 | 
             
              type: :runtime
         | 
| 50 50 | 
             
              version_requirements: *id002
         | 
| 51 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 52 | 
            -
              name: choice
         | 
| 53 | 
            -
              prerelease: false
         | 
| 54 | 
            -
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 55 | 
            -
                none: false
         | 
| 56 | 
            -
                requirements: 
         | 
| 57 | 
            -
                - - ">="
         | 
| 58 | 
            -
                  - !ruby/object:Gem::Version 
         | 
| 59 | 
            -
                    hash: 3
         | 
| 60 | 
            -
                    segments: 
         | 
| 61 | 
            -
                    - 0
         | 
| 62 | 
            -
                    version: "0"
         | 
| 63 | 
            -
              type: :runtime
         | 
| 64 | 
            -
              version_requirements: *id003
         | 
| 65 51 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 66 52 | 
             
              name: mocha
         | 
| 67 53 | 
             
              prerelease: false
         | 
| 68 | 
            -
              requirement: & | 
| 54 | 
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 69 55 | 
             
                none: false
         | 
| 70 56 | 
             
                requirements: 
         | 
| 71 57 | 
             
                - - ">="
         | 
| @@ -75,7 +61,7 @@ dependencies: | |
| 75 61 | 
             
                    - 0
         | 
| 76 62 | 
             
                    version: "0"
         | 
| 77 63 | 
             
              type: :development
         | 
| 78 | 
            -
              version_requirements: * | 
| 64 | 
            +
              version_requirements: *id003
         | 
| 79 65 | 
             
            description: Serve mostly static pages with blocks of client-editable text.
         | 
| 80 66 | 
             
            email: 
         | 
| 81 67 | 
             
            - javan@javan.us
         |