raygun 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.0.22 [2013-02-07]
4
+
5
+ * Support ubuntu and darwin (sed has slightly different syntax for in-place substitution).
6
+ * Take lib off the load path by default.
7
+
3
8
  ## 0.0.21 [2013-02-01]
4
9
 
5
10
  * Turn off threadsafe when running rake tasks (thanks @subakva).
data/README.md CHANGED
@@ -73,6 +73,15 @@ covered (see above).
73
73
  $ foreman start
74
74
  $ open http://0.0.0.0:3000
75
75
 
76
+ ## Internal Mechanics
77
+
78
+ Raygun simply copies the [app_prototype](app_prototype) tree and then runs a small set of commands to customize
79
+ the copied project. So, what you get looks a lot like [app_prototype](app_prototype). Check out
80
+ [raygun](bin/raygun) to see how it's massaged after being copied.
81
+
82
+ This approach is fast, simple, and makes raygun developement very easy. Make changes to [app_prototype](app_prototype),
83
+ run its specs and fire up the server to see what happens.
84
+
76
85
  ## Contributing
77
86
 
78
87
  1. Fork it
@@ -30,7 +30,7 @@ module AppPrototype
30
30
  # -- all .rb files in that directory are automatically loaded.
31
31
 
32
32
  # Custom directories with classes and modules you want to be autoloadable.
33
- config.autoload_paths += %W(#{config.root}/lib)
33
+ # config.autoload_paths += %W(#{config.root}/lib)
34
34
 
35
35
  # Only load the plugins named here, in the order given (default is alphabetical).
36
36
  # :all can be used as a placeholder for all plugins not explicitly named.
data/bin/raygun CHANGED
@@ -34,7 +34,7 @@ module Raygun
34
34
  'app_prototype' => snake_name,
35
35
  'App Prototype' => title_name
36
36
  }.each do |proto_name, new_name|
37
- `find . -type f -print | xargs sed -i '' 's/#{proto_name}/#{new_name}/g'`
37
+ `find . -type f -print | xargs #{sed_i} 's/#{proto_name}/#{new_name}/g'`
38
38
  end
39
39
  end
40
40
  end
@@ -46,7 +46,7 @@ module Raygun
46
46
 
47
47
  def generate_tokens
48
48
  Dir.chdir(app_dir) do
49
- `sed -i '' 's/SUPER_SECRET_TOKEN_REPLACE_ME_TODO/#{SecureRandom.hex(128)}/' #{app_dir}/.env`
49
+ `#{sed_i} 's/SUPER_SECRET_TOKEN_REPLACE_ME_TODO/#{SecureRandom.hex(128)}/' #{app_dir}/.env`
50
50
  end
51
51
  end
52
52
 
@@ -57,8 +57,8 @@ module Raygun
57
57
  current_ruby_patch_level = "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
58
58
 
59
59
  Dir.chdir(app_dir) do
60
- `sed -i '' 's/#{prototype_ruby_patch_level}/#{current_ruby_patch_level}/g' .rvmrc .ruby-version`
61
- `sed -i '' 's/#{prototype_ruby_version}/#{current_ruby_version}/g' Gemfile`
60
+ `#{sed_i} 's/#{prototype_ruby_patch_level}/#{current_ruby_patch_level}/g' .rvmrc .ruby-version`
61
+ `#{sed_i} 's/#{prototype_ruby_version}/#{current_ruby_version}/g' Gemfile`
62
62
  end
63
63
  end
64
64
 
@@ -101,6 +101,11 @@ module Raygun
101
101
  result.gsub(/\b('?[a-z])/) { $1.capitalize }
102
102
  end
103
103
 
104
+ # Mac sed works differently than ubuntu sed when it comes to in-place substituion.
105
+ def sed_i
106
+ RUBY_PLATFORM =~ /dawrin/ ? "sed -i ''" : "sed -i"
107
+ end
108
+
104
109
  class << self
105
110
  def parse(args)
106
111
  raygun = nil
@@ -1,3 +1,3 @@
1
1
  module Raygun
2
- VERSION = "0.0.21"
2
+ VERSION = "0.0.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raygun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-02-02 00:00:00.000000000 Z
14
+ date: 2013-02-07 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: Carbon Five Rails application generator
17
17
  email: