OSDN Git Service

refactoring.
authorwhitestar <whitestar@users.osdn.me>
Mon, 17 Jul 2017 01:42:08 +0000 (10:42 +0900)
committerwhitestar <whitestar@users.osdn.me>
Mon, 17 Jul 2017 01:42:08 +0000 (10:42 +0900)
cookbooks/concourse-ci/.rubocop.yml
cookbooks/concourse-ci/Rakefile
cookbooks/concourse-ci/attributes/default.rb
cookbooks/concourse-ci/metadata.rb
cookbooks/concourse-ci/version [new file with mode: 0644]

index 40056ac..d6966e0 100644 (file)
@@ -10,6 +10,9 @@ Lint/UnusedBlockArgument:
   Enabled: false
 Metrics/AbcSize:
   Enabled: false
+Security/MarshalLoad:
+  Exclude:
+    - 'attributes/default.rb'
 Style/BlockComments:
   Enabled: false
 Style/BlockDelimiters:
@@ -20,12 +23,16 @@ Style/FileName:
   Enabled: false
 Style/LeadingCommentSpace:
   Enabled: false
+Style/MultilineIfModifier:
+  Enabled: false
 Style/RescueModifier:
   Enabled: false
 Style/SpaceBeforeFirstArg:
   Enabled: false
+Style/SpaceInsideBlockBraces:
+  Enabled: false
 Style/TrailingCommaInLiteral:
-  EnforcedStyleForMultiline: comma
+  EnforcedStyleForMultiline: consistent_comma
 Style/WordArray:
   Enabled: false
 
index 7a151a9..64191a5 100644 (file)
@@ -5,7 +5,11 @@ require 'stove/rake_task'
 
 namespace :style do
   desc 'Run Ruby style checks'
-  RuboCop::RakeTask.new(:ruby)
+  RuboCop::RakeTask.new(:ruby) do |t|
+    t.options = [
+      '--auto-gen-config',  # creates .rubocop_todo.yml
+    ]
+  end
 
   desc 'Run Chef style checks'
   FoodCritic::Rake::LintTask.new(:chef) do |t|
@@ -24,6 +28,11 @@ RSpec::Core::RakeTask.new(:spec)
 desc 'Publish cookbook'
 Stove::RakeTask.new(:publish) do |t|
   t.stove_opts = [
+    # `--username` and `--key` are set in ~/.stove typically.
+    #'--username', 'somebody',
+    #'--key', '~/chef/chef.io.example.com/somebody.pem',
+    #'--endpoint', 'https://supermarket.io.example.com/api/v1',  # default: supermarket.chef.io
+    #'--no-ssl-verify',
     '--no-git',
     '--log-level', 'info',
   ]
index 26091c3..329d720 100644 (file)
@@ -152,6 +152,7 @@ version_1_config = {
       # `${POSTGRES_PASSWORD}` is a placeholder of password string.
       'CONCOURSE_POSTGRES_DATA_SOURCE' => \
         'postgres://concourse:${POSTGRES_PASSWORD}@concourse-db:5432/concourse?sslmode=disable',
+      #'CONCOURSE_RESOURCE_CHECKING_INTERVAL' => '1m',  # default
     },
   },
   'concourse-worker' => {
index cefadb1..a737b78 100644 (file)
@@ -5,10 +5,11 @@ maintainer_email ''
 license          'Apache 2.0'
 description      'Installs/Configures Concourse CI by Docker Compose'
 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version          '0.2.0'
+version          IO.read(File.join(File.dirname(__FILE__), 'version')).chomp
 source_url       'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
 issues_url       'https://osdn.jp/projects/metasearch/ticket'
 
+chef_version     '>= 12'
 supports 'ubuntu', '>= 14.04'
 =begin
 %w( centos redhat ).each do |os|
diff --git a/cookbooks/concourse-ci/version b/cookbooks/concourse-ci/version
new file mode 100644 (file)
index 0000000..0c62199
--- /dev/null
@@ -0,0 +1 @@
+0.2.1