andhapp-decoct 1.4.2 → 1.4.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/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 2
2
+ :patch: 3
3
3
  :major: 1
4
4
  :minor: 4
data/bin/decoct CHANGED
@@ -1,6 +1,6 @@
1
1
  app_path = ARGV.first
2
2
 
3
- $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
3
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", 'lib')
4
4
  require 'dscript'
5
5
 
6
6
  decoct = Decoct::Dscript.new(app_path)
data/decoct.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{decoct}
5
- s.version = "1.4.2"
5
+ s.version = "1.4.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Anuj Dutta"]
data/lib/dconstants.rb CHANGED
@@ -4,6 +4,6 @@ module Decoct
4
4
  VIEWS = 'views'
5
5
  SPEC = 'spec'
6
6
  PUBLIC = 'public'
7
- TEMPLATES = File.dirname(__FILE__) + "/../lib/templates/"
7
+ TEMPLATES = File.join(File.dirname(__FILE__), "..", 'lib', 'templates') + File::SEPARATOR.to_s
8
8
  end
9
9
  end
data/lib/dmeta.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'ftools'
2
- require File.dirname(__FILE__) + '/../lib/dconstants'
2
+ require File.join(File.dirname(__FILE__), "..", 'lib', 'dconstants')
3
3
 
4
4
  module Decoct
5
5
  module Dmeta
@@ -21,7 +21,7 @@ module Decoct
21
21
  else
22
22
  attr_reader name
23
23
  define_method("create_#{name}") do
24
- path = "#{app_name}/#{name}"
24
+ path = "#{app_name}#{File::SEPARATOR}#{name}"
25
25
  Dir.mkdir(path) if !test(?d, path)
26
26
  end
27
27
  end
data/lib/dscript.rb CHANGED
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../lib/dmeta'
1
+ require File.join(File.dirname(__FILE__), "..", 'lib', 'dmeta')
2
2
 
3
3
  module Decoct
4
4
 
@@ -31,17 +31,17 @@ module Decoct
31
31
  end
32
32
 
33
33
  def copy_autotest_file
34
- copy_file(".autotest", "#{app_name}/.autotest")
34
+ copy_file(".autotest", "#{app_name}#{File::SEPARATOR}.autotest")
35
35
  end
36
36
 
37
37
  def copy_rspec_files
38
- from = ["spec/spec.opts", "spec/rcov.opts", "spec/spec_helper.rb", "spec/app_spec.rb"]
39
- to = ["#{app_name}/spec/spec.opts", "#{app_name}/spec/rcov.opts", "#{app_name}/spec/spec_helper.rb", "#{app_name}/spec/#{app_name}_spec.rb"]
38
+ from = ["spec#{File::SEPARATOR}spec.opts", "spec#{File::SEPARATOR}rcov.opts", "spec#{File::SEPARATOR}spec_helper.rb", "spec#{File::SEPARATOR}app_spec.rb"]
39
+ to = ["#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec.opts", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}rcov.opts", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec_helper.rb", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}#{app_name}_spec.rb"]
40
40
  copy_file(from, to)
41
41
  end
42
42
 
43
43
  def copy_app_file
44
- copy_file("generic_app.rb", "#{app_name}/#{app_name}.rb")
44
+ copy_file("generic_app.rb", "#{app_name}#{File::SEPARATOR}#{app_name}.rb")
45
45
  end
46
46
 
47
47
  end
@@ -1,2 +1 @@
1
- --exclude "spec/*,gems/*"
2
- --rails
1
+ --exclude "spec/*,gems/*"
@@ -1,6 +1,3 @@
1
- # This file is copied to ~/spec when you run 'ruby script/generate rspec'
2
- # from the project root directory.
3
- require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
4
1
  require 'spec/autorun'
5
2
 
6
3
  Spec::Runner.configure do |config|
data/test/ts_script.rb CHANGED
@@ -27,10 +27,10 @@ class TestScript < Test::Unit::TestCase
27
27
  @script.create_spec
28
28
  @script.copy_rspec_files
29
29
 
30
- assert File.exists?("#{@app_name}/spec/spec.opts")
31
- assert File.exists?("#{@app_name}/spec/rcov.opts")
32
- assert File.exists?("#{@app_name}/spec/spec_helper.rb")
33
- assert File.exists?("#{@app_name}/spec/#{@app_name}_spec.rb")
30
+ assert File.exists?("#{@app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec.opts")
31
+ assert File.exists?("#{@app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}rcov.opts")
32
+ assert File.exists?("#{@app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec_helper.rb")
33
+ assert File.exists?("#{@app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}#{@app_name}_spec.rb")
34
34
 
35
35
  assert_not_nil dir_in_app_folder.index("spec")
36
36
  end
@@ -47,12 +47,12 @@ class TestScript < Test::Unit::TestCase
47
47
 
48
48
  should 'copy the .autotest file to app folder' do
49
49
  @script.copy_autotest_file
50
- assert File.exists?("#{@app_name}/.autotest")
50
+ assert File.exists?("#{@app_name}#{File::SEPARATOR}.autotest")
51
51
  end
52
52
 
53
53
  should 'copy the app file' do
54
54
  @script.copy_app_file
55
- assert File.exists?("#{@app_name}/#{@app_name}.rb")
55
+ assert File.exists?("#{@app_name}#{File::SEPARATOR}#{@app_name}.rb")
56
56
  end
57
57
 
58
58
  teardown do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: andhapp-decoct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anuj Dutta