sunstone_utilities 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1eb91f96f70ed7ecfe19dadfd43fad5762eea48c
4
+ data.tar.gz: a503e4c99300e9d9725d9cd58dc795926ce1da7b
5
+ SHA512:
6
+ metadata.gz: d9481a25825e7017ca24593f468cf1e386add33d2243927d0074a96167753cd53745a4bed5a06ec38dc99c208a0eb1c1d10c1a5f590764b7022be3973c7e0821
7
+ data.tar.gz: 545970b23d88171762a366c30533b61e91b120ec26b11b283156da59abf507c28bf1cf70c1aecf65027c835ecb455ac8200cd55e4b59b72ee5147e70e7b6dd12
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
13
+ /spec/backend
14
+
15
+ *.DS_Store
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in sunstone.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Keith Rowell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,25 @@
1
+ # Sunstone
2
+
3
+ Command line support for getting shit done here at Sunsone.
4
+
5
+ ## Installation
6
+
7
+
8
+ Install:
9
+
10
+ $ gem install sunstone
11
+
12
+ ## Usage
13
+
14
+ TODO: Write usage instructions here
15
+
16
+ ## Development
17
+
18
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
19
+
20
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
21
+
22
+
23
+ ## License
24
+
25
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+
@@ -0,0 +1,14 @@
1
+ # Logfile created on 2017-05-07 20:49:08 +1000 by logger.rb/54362
2
+ D, [2017-05-08T21:44:11.824980 #70507] DEBUG -- :  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3
+ D, [2017-05-08T21:44:11.828394 #70507] DEBUG -- :  (1.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4
+ D, [2017-05-08T21:44:11.838954 #70507] DEBUG -- : ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ I, [2017-05-08T21:44:11.842445 #70507] INFO -- : Migrating to Schema (1)
6
+ D, [2017-05-08T21:44:11.844299 #70507] DEBUG -- :  (0.0ms) begin transaction
7
+ D, [2017-05-08T21:44:11.846207 #70507] DEBUG -- :  (0.6ms) CREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
8
+ D, [2017-05-08T21:44:11.854458 #70507] DEBUG -- : SQL (2.6ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1"]]
9
+ D, [2017-05-08T21:44:11.858153 #70507] DEBUG -- :  (2.3ms) commit transaction
10
+ D, [2017-05-08T21:44:11.877029 #70507] DEBUG -- : ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
11
+ D, [2017-05-08T21:44:11.883620 #70507] DEBUG -- :  (0.2ms) begin transaction
12
+ D, [2017-05-08T21:44:11.885083 #70507] DEBUG -- : SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", 2017-05-08 11:44:11 UTC], ["updated_at", 2017-05-08 11:44:11 UTC]]
13
+ D, [2017-05-08T21:44:11.887970 #70507] DEBUG -- :  (1.1ms) commit transaction
14
+ D, [2017-05-08T21:44:11.900878 #70507] DEBUG -- : ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -0,0 +1,12 @@
1
+ require 'active_support/all'
2
+
3
+ class String
4
+ def dehumanize
5
+ self.underscore.parameterize.underscore
6
+ end
7
+
8
+ def dasherize
9
+ s = self.dehumanize.parameterize.underscore
10
+ s.gsub "_", "-"
11
+ end
12
+ end
@@ -0,0 +1,21 @@
1
+ require 'string_extensions'
2
+
3
+ module SunstoneUtilities
4
+
5
+ def self.git_name name
6
+ name.dasherize
7
+ end
8
+
9
+ def self.slack_channel_name name
10
+ channel_name = name.dasherize
11
+ # reduce the channel name to 21 or less characters as per Slack channel name rules
12
+ while channel_name.length > 21
13
+ # pull the last word off the name
14
+ a = channel_name.split('-')
15
+ a.pop
16
+ channel_name = a.join('-')
17
+ end
18
+ channel_name
19
+ end
20
+
21
+ end
@@ -0,0 +1,24 @@
1
+ module Sunstone
2
+ class Project < ActiveRecord::Base
3
+
4
+ has_many :participants
5
+
6
+ def self.git_name name
7
+ name.dasherize
8
+ end
9
+
10
+ def self.slack_channel_name name
11
+ channel_name = name.dasherize
12
+ # reduce the channel name to 21 or less characters as per Slack channel name rules
13
+ while channel_name.length > 21
14
+ # pull the last word off the name
15
+ a = channel_name.split('-')
16
+ a.pop
17
+ channel_name = a.join('-')
18
+ end
19
+ channel_name
20
+ end
21
+
22
+
23
+ end
24
+ end
@@ -0,0 +1,3 @@
1
+ module SunstoneUtilities
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,43 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'sunstone_utilities/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "sunstone_utilities"
8
+ spec.version = SunstoneUtilities::VERSION
9
+ spec.authors = ["Keith Rowell"]
10
+ spec.email = ["keith@keithrowell.com"]
11
+
12
+ spec.summary = %q{Getting shit done at Sunstone}
13
+ spec.description = %q{Getting shit done at Sunstone}
14
+ spec.homepage = "https://github.com/keithrowell/sunstone-utilities-gem"
15
+ spec.license = "MIT"
16
+
17
+ # # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ # if spec.respond_to?(:metadata)
20
+ # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
21
+ # else
22
+ # raise "RubyGems 2.0 or newer is required to protect against " \
23
+ # "public gem pushes."
24
+ # end
25
+ #
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ # spec.bindir = "bin"
30
+ # spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ # spec.add_dependency 'escort', :path => '../vendor/escort'
34
+ # spec.add_dependency 'gli'
35
+ # spec.add_dependency 'httparty'
36
+ spec.add_dependency 'activesupport'
37
+ spec.add_dependency 'activerecord'
38
+ # spec.add_dependency 'sqlite3'
39
+
40
+ spec.add_development_dependency "bundler", "~> 1.14"
41
+ spec.add_development_dependency "rake", "~> 10.0"
42
+ spec.add_development_dependency "rspec", "~> 3.0"
43
+ end
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sunstone_utilities
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Keith Rowell
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-05-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activerecord
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.14'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.14'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ description: Getting shit done at Sunstone
84
+ email:
85
+ - keith@keithrowell.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - Gemfile
92
+ - LICENSE.txt
93
+ - README.md
94
+ - Rakefile
95
+ - debug.log
96
+ - lib/string_extensions.rb
97
+ - lib/sunstone_utilities.rb
98
+ - lib/sunstone_utilities/models/project.rb
99
+ - lib/sunstone_utilities/version.rb
100
+ - sunstone_utilities.gemspec
101
+ homepage: https://github.com/keithrowell/sunstone-utilities-gem
102
+ licenses:
103
+ - MIT
104
+ metadata: {}
105
+ post_install_message:
106
+ rdoc_options: []
107
+ require_paths:
108
+ - lib
109
+ required_ruby_version: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: '0'
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ requirements: []
120
+ rubyforge_project:
121
+ rubygems_version: 2.6.10
122
+ signing_key:
123
+ specification_version: 4
124
+ summary: Getting shit done at Sunstone
125
+ test_files: []