charmkit 0.3.1 → 0.3.2
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.
- checksums.yaml +4 -4
- data/README.md +61 -11
- data/lib/charmkit/fs.rb +5 -1
- data/lib/charmkit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89b4c283b2d6dadc937ccfb891720976b47fe6e4
|
4
|
+
data.tar.gz: ff44fd07cf6650aa69428a3688b6420eb3e85d99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 120bfb015365589522d5c022f14816df5c751ae9848417936410d9014248fb4465175e58d7d9db8dcf778697aae5066a8f763fe4a955744c3328fb50db76fd57
|
7
|
+
data.tar.gz: d059c8cff4a09d9e9555dab319122d5fc2f2971c92afe056a180c8b6c35003e5b0cd55db14b0b40eef2b00b74c3fcc7961ce388986b0f940b8c1b253e99a29d7
|
data/README.md
CHANGED
@@ -1,8 +1,5 @@
|
|
1
|
-
# Charmkit
|
2
|
-
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/charmkit`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
1
|
+
# Charmkit [](https://badge.fury.io/rb/charmkit)
|
2
|
+
> elegantly elegant charm authoring
|
6
3
|
|
7
4
|
## Installation
|
8
5
|
|
@@ -22,20 +19,73 @@ Or install it yourself as:
|
|
22
19
|
|
23
20
|
## Usage
|
24
21
|
|
25
|
-
|
22
|
+
In **hooks/install**:
|
23
|
+
|
24
|
+
```
|
25
|
+
#!/bin/bash
|
26
|
+
|
27
|
+
apt-get update
|
28
|
+
apt-get install -qyf ruby
|
29
|
+
gem install bundler
|
30
|
+
|
31
|
+
bundle install --standalone
|
32
|
+
```
|
33
|
+
|
34
|
+
In other hooks (eg. **hooks/config-changed**)
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
#!/usr/bin/env ruby
|
38
|
+
require_relative '../bundle/bundler/setup'
|
39
|
+
require 'charmkit'
|
40
|
+
|
41
|
+
package [
|
42
|
+
'nginx-full', 'php-fpm', 'php-cgi', 'php-curl', 'php-gd', 'php-json',
|
43
|
+
'php-mcrypt', 'php-readline', 'php-mbstring', 'php-xml'
|
44
|
+
], :update_cache
|
45
|
+
|
46
|
+
hook_path = ENV['JUJU_CHARM_DIR']
|
47
|
+
app_path = config 'app_path'
|
48
|
+
|
49
|
+
mkdir app_path unless is_dir? app_path
|
50
|
+
|
51
|
+
release = config 'release'
|
52
|
+
|
53
|
+
case release
|
54
|
+
when "stable"
|
55
|
+
resource_path = resource 'stable-release'
|
56
|
+
when "development"
|
57
|
+
resource_path = resource 'development-release'
|
58
|
+
else
|
59
|
+
status :blocked, "Unknown release given #{release}"
|
60
|
+
exit 1
|
61
|
+
end
|
62
|
+
|
63
|
+
run "tar xf #{resource_path} -C #{app_path} --strip-components=1"
|
64
|
+
|
65
|
+
rm "#{app_path}/conf/install.php" unless !is_file? "#{app_path}/conf/install.php"
|
66
|
+
```
|
26
67
|
|
27
68
|
## Development
|
28
69
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
70
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
71
|
+
`rake spec` to run the tests. You can also run `bin/console` for an interactive
|
72
|
+
prompt that will allow you to experiment.
|
30
73
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To
|
74
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To
|
75
|
+
release a new version, update the version number in `version.rb`, and then run
|
76
|
+
`bundle exec rake release`, which will create a git tag for the version, push
|
77
|
+
git commits and tags, and push the `.gem` file
|
78
|
+
to [rubygems.org](https://rubygems.org).
|
32
79
|
|
33
80
|
## Contributing
|
34
81
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at
|
36
|
-
|
82
|
+
Bug reports and pull requests are welcome on GitHub at
|
83
|
+
https://github.com/charmkit/charmkit. This project is intended to be a safe,
|
84
|
+
welcoming space for collaboration, and contributors are expected to adhere to
|
85
|
+
the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
37
86
|
|
38
87
|
## License
|
39
88
|
|
40
|
-
The gem is available as open source under the terms of
|
89
|
+
The gem is available as open source under the terms of
|
90
|
+
the [MIT License](http://opensource.org/licenses/MIT).
|
41
91
|
|
data/lib/charmkit/fs.rb
CHANGED
data/lib/charmkit/version.rb
CHANGED