dev 1.0.161 → 1.0.162
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 +46 -0
- data/lib/dev/Commands.rb +1 -0
- data/lib/dev/Project.rb +1 -1
- data/lib/dev/SystemCall.rb +2 -2
- metadata +1 -1
data/README
CHANGED
@@ -25,3 +25,49 @@ Copyright 2012-2013 Lou Parslow
|
|
25
25
|
See the License for the specific language governing permissions and
|
26
26
|
limitations under the License.
|
27
27
|
|
28
|
+
|
29
|
+
=dev
|
30
|
+
the dev gem provides functionality to support the development of ruby,c#,c++ and c projects.
|
31
|
+
when the require 'dev' is used in a rakefile, the variable DEV is defined as well as
|
32
|
+
several rake tasks.
|
33
|
+
the DEV variable may be manipulated to modify behavior of defined tasks or to
|
34
|
+
cause additional task to be generated.
|
35
|
+
|
36
|
+
==Installation
|
37
|
+
dev can be installed by the single command
|
38
|
+
gem install dev
|
39
|
+
|
40
|
+
==Usage
|
41
|
+
dev can be included in a ruby script with
|
42
|
+
require 'dev'
|
43
|
+
|
44
|
+
a constant PROJECT hash is the primary variable about which the dev functionality revolves
|
45
|
+
some example usages:
|
46
|
+
PROJECT=Dev::Project.new{( name: 'HelloRuby' )}
|
47
|
+
|
48
|
+
===Simplest usage
|
49
|
+
DEV_HOME/wrk/Examples/HelloRuby/trunk/rakefile.rb
|
50
|
+
require 'dev'
|
51
|
+
|
52
|
+
==Reference
|
53
|
+
===Variables
|
54
|
+
PROJECT is a global instance of a Hash. The variable may be define explictly with
|
55
|
+
PROJECT=Dev::Project.new({ name: 'example' })
|
56
|
+
or may be automatically generated as needed when specific tasks are executed.
|
57
|
+
|
58
|
+
===Tasks
|
59
|
+
rake add # add files defined by src_glob to source code management
|
60
|
+
rake check # checks if the project default task may be skipped
|
61
|
+
rake clean # Remove any temporary products.
|
62
|
+
rake clobber # Remove any generated file.
|
63
|
+
rake commit # commit
|
64
|
+
rake compile # compile
|
65
|
+
rake features # tests cucumber features
|
66
|
+
rake info # display information about the rakefile
|
67
|
+
rake loc # count the lines of code
|
68
|
+
rake pull # rake working copies of dependencies
|
69
|
+
rake replace # replace text
|
70
|
+
rake setup # setup the project environment
|
71
|
+
rake test # run unit tests
|
72
|
+
rake update # updates changes from source code management
|
73
|
+
|
data/lib/dev/Commands.rb
CHANGED
data/lib/dev/Project.rb
CHANGED
@@ -21,7 +21,7 @@ class Project < Hash
|
|
21
21
|
h[:group]=get_default_value_group
|
22
22
|
h[:name]=get_default_value_name
|
23
23
|
h[:version]= "#{SemVer.find.major}.#{SemVer.find.minor}.#{SemVer.find.patch}"
|
24
|
-
h[:src_glob]="**/{*.{rb,feature,spec,cs,c,cpp,h,hpp,csproj,vcproj,snk,vcxproj,sln,filters,xaml,xml,resx,settings,txt,png,bmp,ico},Jamfile,.semver,Gemfile,README,LICENSE}"
|
24
|
+
h[:src_glob]="**/{*.{rb,feature,spec,cs,c,m,cpp,h,hpp,csproj,vcproj,snk,vcxproj,sln,filters,xaml,xml,resx,settings,txt,png,bmp,ico},Jamfile,.semver,Gemfile,README,LICENSE}"
|
25
25
|
h[:type]=get_default_value_type
|
26
26
|
h[:dev_root]= "#{Dev::Environment.dev_root}"
|
27
27
|
if !Dev::BoostBuild.defaultToolset.nil?
|
data/lib/dev/SystemCall.rb
CHANGED
@@ -116,8 +116,8 @@ class SystemCall
|
|
116
116
|
capture_error=false unless capture_output
|
117
117
|
capture_error=false if capture_error == "false"
|
118
118
|
|
119
|
-
filename=Dir.tmpdir + "/" + (0...
|
120
|
-
filename=Dir.tmpdir + "/" + (0...
|
119
|
+
filename=Dir.tmpdir + "/" + (0...2).map{65.+(rand(25)).chr}.join
|
120
|
+
filename=Dir.tmpdir + "/" + (0...2).map{65.+(rand(25)).chr}.join if File.exist? "#{filename}.out"
|
121
121
|
working_dir = Dir.pwd if working_dir.nil? || working_dir.empty?
|
122
122
|
status=0
|
123
123
|
output=""
|