terrimporter 0.5.4 → 0.6.0

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- terrimporter (0.5.3)
4
+ terrimporter (0.5.4)
5
5
  kwalify (>= 0.7.2)
6
6
 
7
7
  GEM
data/README.rdoc CHANGED
@@ -1,6 +1,75 @@
1
- = terrimporter
1
+ = terrimporter - terrific javascript, css and image importer
2
+
3
+ This package contains terrimporter, a simple command line utility to help import terrific (http://www.terrifically.org/)
4
+ files such as javascripts, css files and images into your web project.
5
+
6
+ terrimporter has the following features:
7
+
8
+ * Import the generated base.js file
9
+ * Import the generated base.css file
10
+ * Configure the export settings for the generated files
11
+ * Import dynamic javascript libraries
12
+ * Import arbitrary css files (ie.css for eample)
13
+ * Import images with the option to filter file endings
14
+ * String and regex replacement in css files
15
+ * Definable target directories
16
+
17
+ == Installation
18
+
19
+ === Gem Installation
20
+
21
+ Download and install terrimporter with the following.
22
+
23
+ gem install terrimporter
24
+
25
+ == Usage
26
+
27
+ === Simple Example
28
+
29
+ terrimporter operates on a working directory bases.
30
+ Start with cd-ing into your project directory:
31
+
32
+ $ cd /your/project/dir
33
+
34
+ Initialize the terrimporter configuration file afterwards:
35
+
36
+ $ terrimporter --init
37
+
38
+ You can move the configuration file to the following subdirectoris afterwards if desired:
39
+
40
+ * config
41
+ * .config
42
+
43
+ This creates a .yml config file.
44
+ The file itself is well documented and only needs a few adjustments in order to work properly with your project.
45
+
46
+ Afterwards a few simple commands allow you to import terrific files into your local project.
47
+
48
+ * Import all files
49
+ $ terrimporter -a
50
+ * Import javascript files
51
+ $ terrimporter -j
52
+ * Import css files
53
+ $ terrimporter -c
54
+ * Import image files
55
+ $ terrimporter -i
56
+
57
+ A complete set of commands is available with
58
+ $ terrimporter -h
59
+
60
+ Common options:
61
+ -a, --all export everything configured; javascripts, css files and images
62
+ -c, --css export configured css files
63
+ -i, --img export configured image files
64
+ -j, --js export configured javascript files
65
+ --init [CONFIG_EXISTS] create configuration file in current working directory. use optional argument to force file replacement (backup, replace)
66
+ -f, --config CONFIG_FILE use alternative configuration file
67
+
68
+ Additional configuration:
69
+ -v, --[no-]verbose run verbosely
70
+ --version Show version
71
+ -h, --help display this help and exit
2
72
 
3
- Description following in one of the next releases
4
73
 
5
74
  == Contributing to terrimporter
6
75
 
@@ -17,3 +86,16 @@ Description following in one of the next releases
17
86
  Copyright (c) 2011 Daniel Kummer. See LICENSE.txt for
18
87
  further details.
19
88
 
89
+ = Other stuff
90
+
91
+ Author:: Daniel Kummer <daniel.kummer@gmail.com>
92
+ Requires:: Ruby 1.8.7 or later
93
+
94
+ == Warranty
95
+
96
+ This software is provided "as is" and without any express or
97
+ implied warranties, including, without limitation, the implied
98
+ warranties of merchantibility and fitness for a particular
99
+ purpose.
100
+
101
+
@@ -26,7 +26,7 @@ module ConfigHelper
26
26
  end
27
27
 
28
28
  def create_config_file(backup_or_replace = nil)
29
- puts "Creating configuration file"
29
+ puts "Creating configuration file..."
30
30
  case backup_or_replace
31
31
  when :backup
32
32
  puts "Backing up old configuration file to #{config_working_directory_path}.bak"
@@ -36,6 +36,7 @@ module ConfigHelper
36
36
  FileUtils.rm_f(config_working_directory_path) if File.exists? config_working_directory_path
37
37
  end
38
38
  FileUtils.cp(config_example_path, config_working_directory_path)
39
+ puts "done! You should take a look an edit it to your needs..."
39
40
  end
40
41
 
41
42
  private
@@ -1,8 +1,5 @@
1
- require 'etc'
2
- require 'kwalify'
3
- require 'config_validator'
4
- require 'config_helper'
5
- require 'configuration'
1
+ #require 'etc'
2
+ #require 'kwalify'
6
3
 
7
4
  module TerrImporter
8
5
  class Application
@@ -1,6 +1,4 @@
1
- require 'fileutils'
2
- require 'yaml'
3
- require 'uri'
1
+
4
2
 
5
3
  module TerrImporter
6
4
 
@@ -54,7 +54,6 @@ module TerrImporter
54
54
 
55
55
  begin
56
56
  @opts.parse!(args)
57
- show_help_on_no_options
58
57
  #self[:input_file] = args.shift #todo remove if really not necessary
59
58
  rescue OptionParser::InvalidOption => e
60
59
  self[:invalid_argument] = e.message
@@ -65,14 +64,6 @@ module TerrImporter
65
64
  self.class.new(@orig_args + other.orig_args)
66
65
  end
67
66
 
68
- def show_help_on_no_options
69
- unless self[:import_css] or self[:import_js] or self[:import_images] or self[:init] or self[:version]
70
- puts "None of the default options selected, showing help"
71
- self[:show_help] = true
72
- else
73
- self[:show_help] = false
74
- end
75
- end
76
67
  end
77
68
  end
78
69
  end
@@ -1,4 +1,4 @@
1
1
  #Generated by rake task, last bump: patch3major1minor5
2
2
  module TerrImporter
3
- VERSION = "0.5.4"
3
+ VERSION = "0.6.0"
4
4
  end
data/lib/terrimporter.rb CHANGED
@@ -7,6 +7,11 @@ require 'terrimporter/config_helper'
7
7
  require 'terrimporter/config_validator'
8
8
  require 'terrimporter/configuration'
9
9
  require 'terrimporter/downloader'
10
+ require 'etc'
11
+ require 'kwalify'
12
+ require 'fileutils'
13
+ require 'yaml'
14
+ require 'uri'
10
15
 
11
16
  module TerrImporter
12
17
  class Application
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terrimporter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 5
9
- - 4
10
- version: 0.5.4
8
+ - 6
9
+ - 0
10
+ version: 0.6.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Kummer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-27 00:00:00 Z
18
+ date: 2011-08-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: kwalify