dev 1.0.223 → 1.0.224

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +80 -56
  2. data/lib/dev/cmd/Commit.rb +0 -1
  3. metadata +2 -1
data/README CHANGED
@@ -1,12 +1,9 @@
1
1
  =dev (README)
2
- the dev gem provides functionality to support the development of ruby,c#,c++ and c projects.
3
- dev may be used to auto generate rake tasks
4
-
5
- =dev
6
- the dev gem provides functionality to support the development of ruby,c#,c++ and c projects.
7
- when the require 'dev' is used in a rakefile, the variable DEV is defined as well as
8
- several rake tasks.
9
- the DEV variable may be manipulated to modify behavior of defined tasks or to
2
+ The dev gem may be used to auto generate rake tasks for a rakefile.rb
3
+ A constant hash DEV is defined that is populated based on the content
4
+ of the directory in which a rakefile.rb resides.
5
+ The dev gem provides task definitions to support the development of ruby,c#,c++ and c projects.
6
+ The DEV variable may be manipulated to modify the behavior of defined tasks or to
10
7
  cause additional task to be generated.
11
8
 
12
9
  ==Installation
@@ -14,67 +11,94 @@ dev can be installed by the single command
14
11
  gem install dev
15
12
 
16
13
  ==Usage
17
- dev can be included in a ruby script with
14
+ dev can be included in a rakefile.rb with
18
15
  require 'dev'
19
16
 
20
- a constant DEV hash is the primary variable about which the dev functionality revolves
21
- some example usages:
22
- PROJECT=Dev::Project.new{( name: 'HelloRuby' )}
23
-
24
- ===Simplest usage
25
- DEV_HOME/wrk/Examples/HelloRuby/trunk/rakefile.rb
26
- require 'dev'
27
-
28
17
  ==Reference
29
18
  ===Variables
30
19
  ====DEV is a global instance of a Hash. The variable is define by require 'dev' statement
31
20
  DEV may define several keys automatically
32
- =====DEV[scm_uri] the uri for the source code management system.
33
- =====DEV[:scm_type] the type of source code managment, (none,svn,git).
34
- =====DEV[:directory] the full directory name of the rakefile.rb.
35
- =====DEV[:fullname] the name of the project (inferred by directory structure relative to DEV_ROOT).
36
- =====DEV[:version] the version specified by the .semver file.
37
- =====DEV[:dev_root] the root working directory ENV['DEV_ROOT'] if defined, otherwise user home directory.
38
- =====DEV[:toolset] the boost build toolset, if available
39
- =====DEV[:paths] a hash containing various environment paths
21
+ DEV[:scm_uri] # the uri for the source code management system.
22
+ DEV[:scm_type] # the type of source code managment, (none,svn,git).
23
+ DEV[:directory] # the full directory name of the rakefile.rb.
24
+ DEV[:fullname] # the name of the project (inferred by directory structure relative to DEV_ROOT).
25
+ DEV[:version] # the version specified by the .semver file.
26
+ DEV[:src_glob] # the glob pattern(s) defining the source files.
27
+ DEV[:dev_root] # the root working directory ENV['DEV_ROOT'] if defined, otherwise user home directory.
28
+ DEV[:toolset] # the boost build toolset, if available
29
+ DEV[:paths] # a hash containing various environment paths
40
30
  ====CLEAN is a Rake::FileList that specifies file(s) to be removed during the clean task.
31
+ CLEAN.include('doc')
41
32
  ====CLOBBER is a Rake::FileList that specifies file(s) to be removed during the clobber task.
33
+ CLOBBER.include('obj')
42
34
  ====BUILD_PRODUCTS is a Rake::FileList that specified file(s) that are required to consume the project.
43
35
  ===Tasks
44
- rake add # add files defined by src_glob to source code management
45
- rake check # checks if the project default task may be skipped
46
- rake clean # Remove any temporary products.
47
- rake clobber # Remove any generated file.
48
- rake commit # commit
49
- rake compile # compile
50
- rake features # tests cucumber features
51
- rake info # display information about the rakefile
52
- rake loc # count the lines of code
53
- rake pull # rake working copies of dependencies
54
- rake replace # replace text
55
- rake setup # setup the project environment
56
- rake test # run unit tests
57
- rake update # updates changes from source code management
58
- rake default # is automatically generated by require 'dev' or TASKS.refresh
59
- # to prevent automatic generation of default task,
60
- # define DEV_NO_DEFAULT_TASK prior to require 'dev'
61
- # the automatically generated task will execute the following tasks (if defined)
62
- # ["check","setup","replace","pre_compile","compile","post_compile","pre_test",
63
- # "test","post_test","log_build_products","add","commit","update","finalize"]
64
- # defining an array of string named DEFAULT_TASK_ORDER will cause
65
- # the default task to contain those tasks (if defined).
36
+ dev will automatically generated the following tasks as applicable.
37
+ rake add # add files defined by src_glob to source code management, not generated if no scm can be detected.
38
+ rake check # checks if the project default task may be skipped
39
+ rake clean # Remove any temporary products.
40
+ rake clobber # Remove any generated file.
41
+ rake commit # commits to scm. not generated if no scm detected.
42
+ rake compile # compile command(s).
43
+ rake features # tests cucumber features
44
+ rake info # display information about the rakefile
45
+ rake replace # replace text
46
+ rake setup # setup the project environment
47
+ rake test # run unit tests
48
+ rake update # updates changes from source code management
49
+ rake default # the default task for the rakefile
50
+
51
+ If either pre_compile or post_compile tasks are manually created, then TASKS.refresh is called,
52
+ these task will be executed in the correct sequence (either before or after compile task) by the default task
53
+ require 'dev'
54
+
55
+ task :pre_compile do
56
+ puts 'pre_compile'
57
+ end
58
+
59
+ task :post_compile
60
+ puts 'post_compile'
61
+ end
62
+
63
+ TASKS.refresh
64
+
65
+ the default task is automatically generated by require 'dev'. It will be defined as dependent on the following tasks if they are defined:
66
+ ["check","setup","replace","pre_compile","compile","post_compile","pre_test",
67
+ "test","post_test","log_build_products","add","commit","update","finalize"]
68
+ to prevent the default task from being defined, define DEV_NO_DEFAULT_TASK prior to require 'dev'
69
+ DEV_NO_DEFAULT_TASK=1
70
+ require 'dev'
71
+
72
+ # now, can manually define default task
73
+ task :default do
74
+ puts "hello default task"
75
+ end
76
+ to provide a custom set of default dependencies, the DEFAULT_TASK_ORDER may be defined prior to require 'dev',
77
+ then a call to TASKS.refresh can be made to redefine the default task
78
+ DEFAULT_TASK_ORDER=["step1","step2"]
79
+ require 'dev'
80
+
81
+ task :step1 do
82
+ puts "step1"
83
+ end
84
+
85
+ task :step2 do
86
+ puts "step2"
87
+ end
88
+
89
+ TASKS.refresh
66
90
 
67
91
  ==License
68
92
  Copyright 2012-2013 Lou Parslow
69
93
 
70
- Licensed under the Apache License, Version 2.0 (the "License");
71
- you may not use this file except in compliance with the License.
72
- You may obtain a copy of the License at
94
+ Licensed under the Apache License, Version 2.0 (the "License");
95
+ you may not use this file except in compliance with the License.
96
+ You may obtain a copy of the License at
73
97
 
74
- http://www.apache.org/licenses/LICENSE-2.0
98
+ http://www.apache.org/licenses/LICENSE-2.0
75
99
 
76
- Unless required by applicable law or agreed to in writing, software
77
- distributed under the License is distributed on an "AS IS" BASIS,
78
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
79
- See the License for the specific language governing permissions and
80
- limitations under the License.
100
+ Unless required by applicable law or agreed to in writing, software
101
+ distributed under the License is distributed on an "AS IS" BASIS,
102
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
103
+ See the License for the specific language governing permissions and
104
+ limitations under the License.
@@ -10,7 +10,6 @@ class Commit < Array
10
10
  else
11
11
  if scm_type == "git"
12
12
  self << "{:cmd=>'git commit -a -F commit.message',:auto=>true}"
13
- #self << "{:cmd=>'git svn dcommit',:auto=>true}"
14
13
  end
15
14
  end
16
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.223
4
+ version: 1.0.224
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -248,3 +248,4 @@ signing_key:
248
248
  specification_version: 3
249
249
  summary: dev
250
250
  test_files: []
251
+ has_rdoc: