thoughtful 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -3,13 +3,13 @@ License.txt
3
3
  Manifest.txt
4
4
  README.txt
5
5
  Rakefile
6
+ bin/thoughtify
6
7
  config/hoe.rb
7
8
  config/requirements.rb
8
9
  lib/thoughtful.rb
9
10
  lib/thoughtful/object.rb
10
11
  lib/thoughtful/require.rb
11
12
  lib/thoughtful/symbol.rb
12
- lib/thoughtful/thoughtful.rake
13
13
  lib/thoughtful/version.rb
14
14
  log/debug.log
15
15
  script/destroy
data/bin/thoughtify ADDED
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Created on 2008-2-19.
4
+ # Copyright (c) 2008. All rights reserved.
5
+
6
+ begin
7
+ require 'rubygems'
8
+ rescue LoadError
9
+ # no rubygems to load, so we fail silently
10
+ end
11
+
12
+ require 'optparse'
13
+
14
+ # NOTE: the option -p/--path= is given as an example, and should probably be replaced in your application.
15
+
16
+ OPTIONS = {
17
+ :path => '~'
18
+ }
19
+ MANDATORY_OPTIONS = %w( )
20
+
21
+ parser = OptionParser.new do |opts|
22
+ opts.banner = <<BANNER
23
+ This application is wonderful because...
24
+
25
+ Usage: #{File.basename($0)} [options]
26
+
27
+ Options are:
28
+ BANNER
29
+ opts.separator ""
30
+ opts.on("-p", "--path=PATH", String,
31
+ "The root path for selecting files",
32
+ "Default: ~") { |OPTIONS[:path]| }
33
+ opts.on("-h", "--help",
34
+ "Show this help message.") { puts opts; exit }
35
+ opts.parse!(ARGV)
36
+
37
+ if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| OPTIONS[option.to_sym].nil? }
38
+ puts opts; exit
39
+ end
40
+ end
41
+
42
+ path = OPTIONS[:path]
43
+
44
+ require 'fileutils'
45
+ unpacked_msg = %x[gem unpack thoughtful]
46
+ unpacked_location = unpacked_msg.gsub(/^.*'(.*)'$/, '\1').chomp
47
+ Dir["vendor/thoughtful/**/.svn"].each do |file|
48
+ mv(file, "#{unpacked_location}/lib/" + file.gsub(/^vendor\/thoughtful\/(.*)/,'\1').chomp) if file =~ /.svn/
49
+ end
50
+ FileUtils.rm_rf "vendor/thoughtful"
51
+ FileUtils.mv "#{unpacked_location}/lib/", "vendor/thoughtful"
52
+ FileUtils.rm_rf unpacked_location
53
+
54
+ current_environment = File.readlines("config/environment.rb")
55
+ require_line = "require RAILS_ROOT + '/vendor/thoughtful/thoughtful'"
56
+ File.open("config/environment.rb", "w") do |file|
57
+ after_book = false
58
+ current_environment.each do |line|
59
+ if after_book
60
+ if line.chomp != require_line.chomp
61
+ file << require_line
62
+ file << "\n"
63
+ end
64
+ after_book = false
65
+ end
66
+ file << line
67
+ after_book = true if line =~ /require File\.join\(File\.dirname\(__FILE__\), 'boot'\)/
68
+ end
69
+ end
@@ -2,7 +2,7 @@ module Thoughtful #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 6
5
+ TINY = 7
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>thoughtful</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/thoughtful"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/thoughtful" class="numbers">0.0.6</a>
36
+ <a href="http://rubyforge.org/projects/thoughtful" class="numbers">0.0.7</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;thoughtful&#8217;</h1>
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thoughtful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Fields
@@ -9,15 +9,15 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-02-19 00:00:00 -08:00
12
+ date: 2008-03-03 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
16
  description: rails extensions for making you more productive
17
17
  email:
18
18
  - thoughtful@jayfields.com
19
- executables: []
20
-
19
+ executables:
20
+ - thoughtify
21
21
  extensions: []
22
22
 
23
23
  extra_rdoc_files:
@@ -32,13 +32,13 @@ files:
32
32
  - Manifest.txt
33
33
  - README.txt
34
34
  - Rakefile
35
+ - bin/thoughtify
35
36
  - config/hoe.rb
36
37
  - config/requirements.rb
37
38
  - lib/thoughtful.rb
38
39
  - lib/thoughtful/object.rb
39
40
  - lib/thoughtful/require.rb
40
41
  - lib/thoughtful/symbol.rb
41
- - lib/thoughtful/thoughtful.rake
42
42
  - lib/thoughtful/version.rb
43
43
  - log/debug.log
44
44
  - script/destroy
@@ -1,19 +0,0 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'fileutils'
4
-
5
- namespace :thoughtful do
6
- desc "freeze thoughtful to vendor/gems"
7
- task :freeze do
8
- unpacked_msg = %x[gem unpack thoughtful]
9
- unpacked_location = unpacked_msg.gsub(/^.*'(.*)'$/, '\1').chomp
10
- Dir["vendor/gems/thoughtful/**/.svn"].each do |file|
11
- mv(file, "#{unpacked_location}/lib/" + file.gsub(/^vendor\/gems\/thoughtful\/(.*)/,'\1').chomp) if file =~ /.svn/
12
- end
13
- rm_rf "vendor/gems/thoughtful"
14
- mv "#{unpacked_location}/lib/", "vendor/gems/thoughtful"
15
- mkdir_p "lib/tasks"
16
- mv "vendor/gems/thoughtful/thoughtful/thoughtful.rake", "lib/tasks"
17
- rm_rf unpacked_location
18
- end
19
- end