styleyt 0.2.1 → 0.2.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.textile +4 -3
 - data/Rakefile +1 -1
 - data/VERSION +1 -1
 - data/lib/generators/styleyt/preview_generator.rb +1 -0
 - data/lib/generators/styleyt/styleyt_helper.rb +12 -11
 - metadata +4 -5
 
    
        data/README.textile
    CHANGED
    
    | 
         @@ -11,8 +11,9 @@ h2. Goal of the project 
     | 
|
| 
       11 
11 
     | 
    
         
             
            h2. Realisation
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
            * It must be usable as an rails extension.
         
     | 
| 
       14 
     | 
    
         
            -
            *  
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
      
 14 
     | 
    
         
            +
            * It is available as a 'styleyt' gem from http://gemcutter.org
         
     | 
| 
      
 15 
     | 
    
         
            +
            * It adds a two new rails generators:
         
     | 
| 
      
 16 
     | 
    
         
            +
            ** styleyt:theme and styleyt:preview
         
     | 
| 
       16 
17 
     | 
    
         | 
| 
       17 
18 
     | 
    
         
             
            h2. Documentation
         
     | 
| 
       18 
19 
     | 
    
         | 
| 
         @@ -24,7 +25,7 @@ Code is available at "github":http://github.com/CyTeam/styleyt. 
     | 
|
| 
       24 
25 
     | 
    
         | 
| 
       25 
26 
     | 
    
         
             
            Issue tracking is done using "Redmine":http://redmine.cyt.ch/projects/mailyt/issues.
         
     | 
| 
       26 
27 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
            To get an idea on what we're currently focus on visit the "Roadmap":http://redmine.cyt.ch/projects/styleyt/ 
     | 
| 
      
 28 
     | 
    
         
            +
            To get an idea on what we're currently focus on visit the "Roadmap":http://redmine.cyt.ch/projects/styleyt/roadmap.
         
     | 
| 
       28 
29 
     | 
    
         | 
| 
       29 
30 
     | 
    
         
             
            h2. License
         
     | 
| 
       30 
31 
     | 
    
         | 
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -15,7 +15,7 @@ begin 
     | 
|
| 
       15 
15 
     | 
    
         
             
                # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
         
     | 
| 
       16 
16 
     | 
    
         
             
                gem.files = Dir["{lib,test}/**/*", "[A-Z]*"]
         
     | 
| 
       17 
17 
     | 
    
         
             
                gem.require_path = 'lib'
         
     | 
| 
       18 
     | 
    
         
            -
                gem.add_dependency 'rails', '3.0.0 
     | 
| 
      
 18 
     | 
    
         
            +
                gem.add_dependency 'rails', '3.0.0'
         
     | 
| 
       19 
19 
     | 
    
         
             
                gem.add_dependency 'haml'
         
     | 
| 
       20 
20 
     | 
    
         
             
                gem.add_dependency 'compass'
         
     | 
| 
       21 
21 
     | 
    
         
             
              end
         
     | 
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0.2. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.2.3
         
     | 
| 
         @@ -17,27 +17,26 @@ module Styleyt 
     | 
|
| 
       17 
17 
     | 
    
         
             
                SASS_FILES = '*.s[c|a]ss'
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
                #
         
     | 
| 
       20 
     | 
    
         
            -
                # Asks which theme should be used 
     | 
| 
      
 20 
     | 
    
         
            +
                # Asks which theme should be used
         
     | 
| 
       21 
21 
     | 
    
         
             
                #
         
     | 
| 
       22 
22 
     | 
    
         
             
                def ask_for_theme
         
     | 
| 
       23 
     | 
    
         
            -
                  theme = ask "Available themes: #{available_themes}\nWhich theme  
     | 
| 
      
 23 
     | 
    
         
            +
                  theme = ask "Available themes: #{available_themes}\nWhich theme would you like to install?"
         
     | 
| 
       24 
24 
     | 
    
         
             
                  theme = 'default' if theme.empty?
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
                  theme
         
     | 
| 
       27 
27 
     | 
    
         
             
                end
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
29 
     | 
    
         
             
                #
         
     | 
| 
       30 
     | 
    
         
            -
                # Returns the  
     | 
| 
      
 30 
     | 
    
         
            +
                # Returns the available themes
         
     | 
| 
       31 
31 
     | 
    
         
             
                #
         
     | 
| 
       32 
32 
     | 
    
         
             
                def available_themes
         
     | 
| 
       33 
     | 
    
         
            -
                  Dir.chdir(File.join(File.dirname(__FILE__), SASS_TEMPLATES_DIRECTORY, 'themes'))
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
                  themes[0..themes.length-2]
         
     | 
| 
      
 33 
     | 
    
         
            +
                  Dir.chdir(File.join(File.dirname(__FILE__), SASS_TEMPLATES_DIRECTORY, 'themes')) do
         
     | 
| 
      
 34 
     | 
    
         
            +
                    Dir.glob("*").join(',')
         
     | 
| 
      
 35 
     | 
    
         
            +
                  end
         
     | 
| 
       37 
36 
     | 
    
         
             
                end
         
     | 
| 
       38 
37 
     | 
    
         | 
| 
       39 
38 
     | 
    
         
             
                #
         
     | 
| 
       40 
     | 
    
         
            -
                # Returns the theme  
     | 
| 
      
 39 
     | 
    
         
            +
                # Returns the theme directories
         
     | 
| 
       41 
40 
     | 
    
         
             
                #
         
     | 
| 
       42 
41 
     | 
    
         
             
                def theme_directory(theme)
         
     | 
| 
       43 
42 
     | 
    
         
             
                  File.join(File.dirname(__FILE__), SASS_TEMPLATES_DIRECTORY, 'themes', theme)
         
     | 
| 
         @@ -50,10 +49,12 @@ module Styleyt 
     | 
|
| 
       50 
49 
     | 
    
         
             
                  File.join(File.dirname(__FILE__), SASS_TEMPLATES_DIRECTORY)
         
     | 
| 
       51 
50 
     | 
    
         
             
                end
         
     | 
| 
       52 
51 
     | 
    
         | 
| 
      
 52 
     | 
    
         
            +
                
         
     | 
| 
      
 53 
     | 
    
         
            +
                #
         
     | 
| 
      
 54 
     | 
    
         
            +
                # Returns the filename without any extensions
         
     | 
| 
      
 55 
     | 
    
         
            +
                #
         
     | 
| 
       53 
56 
     | 
    
         
             
                def remove_file_suffix(file)
         
     | 
| 
       54 
     | 
    
         
            -
                  file 
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
                  file.first
         
     | 
| 
      
 57 
     | 
    
         
            +
                  file.split('.').first
         
     | 
| 
       57 
58 
     | 
    
         
             
                end
         
     | 
| 
       58 
59 
     | 
    
         | 
| 
       59 
60 
     | 
    
         
             
              end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version 
     | 
|
| 
       5 
5 
     | 
    
         
             
              segments: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              - 0
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 2
         
     | 
| 
       8 
     | 
    
         
            -
              -  
     | 
| 
       9 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 8 
     | 
    
         
            +
              - 3
         
     | 
| 
      
 9 
     | 
    
         
            +
              version: 0.2.3
         
     | 
| 
       10 
10 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       11 
11 
     | 
    
         
             
            authors: 
         
     | 
| 
       12 
12 
     | 
    
         
             
            - Roman Simecek
         
     | 
| 
         @@ -14,7 +14,7 @@ autorequire: 
     | 
|
| 
       14 
14 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       15 
15 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
            date: 2010- 
     | 
| 
      
 17 
     | 
    
         
            +
            date: 2010-10-19 00:00:00 +02:00
         
     | 
| 
       18 
18 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       19 
19 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       20 
20 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -42,8 +42,7 @@ dependencies: 
     | 
|
| 
       42 
42 
     | 
    
         
             
                    - 3
         
     | 
| 
       43 
43 
     | 
    
         
             
                    - 0
         
     | 
| 
       44 
44 
     | 
    
         
             
                    - 0
         
     | 
| 
       45 
     | 
    
         
            -
                     
     | 
| 
       46 
     | 
    
         
            -
                    version: 3.0.0.rc
         
     | 
| 
      
 45 
     | 
    
         
            +
                    version: 3.0.0
         
     | 
| 
       47 
46 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       48 
47 
     | 
    
         
             
              version_requirements: *id002
         
     | 
| 
       49 
48 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |