naturecommits 0.0.1 → 0.0.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.
data/CHANGELOG CHANGED
@@ -1,36 +1,7 @@
1
- 0.1.3 (18 May 2012)
2
- * add LGPLv3 license
3
- * add option to translate your commit message to lolspeak! (thx
4
- to @DanielleSucher!). To enable, set `naturecommits_TRANZLATE=1`.
5
- * fix issue with older versions of IM crashing on interline spacing (pull #31 via @german)
6
- * fix issue with git repos with no hooks directory (pull #43 via @mkmaster)
7
- * fix missing dash in capture -c
1
+ 0.0.2 (23 May 2012)
2
+ * moved bucket to the config
3
+ * added error checking for the yaml file
8
4
 
9
- 0.1.2 (22 April 2012)
10
- * provide licensing info for CommandCam (Windows)
11
- * bundle imagesnap as well to remove a dependency on Mac OS X
12
-
13
- 0.1.1 (21 April 2012)
14
- * Windows compatibility! Thanks to @Prydonious.
15
-
16
- 0.1.0 (19 April 2012)
17
- * Linux compatibility! Thanks to @madjar, @cscorely, and @Prydonius.
18
-
19
- 0.0.3 (16 April 2012)
20
- * use only first line for multi-line commit msgs (pull req #21)
21
- * clean up some command line options
22
-
23
- 0.0.2 (2 April 2012)
24
- * add --delay option to delay image capture (thx JohanB), can be
25
- persistently set via naturecommits_DELAY environment variable.
26
- * add --last command to view most recent lolcommit for a repo
27
- * add --browse command to open the lolcommit images directory for a particular repo
28
-
29
- 0.0.1 (29 March 2012)
30
- * initial release as a gem package, major refactoring for this
31
- * refactored to remove git-hooks package dependency, now installs stub hook
32
- directly into each git repo
33
- * wordwrap commit_msg manually, to switch to use imagemagick annotate
34
- instead of compositing multiply image Caption objects (this seems to be more
35
- reliable to not glitch.)
5
+ 0.0.1 (22 May 2012)
6
+ * initial release as a gem package
36
7
 
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
- [![Build Status](https://secure.travis-ci.org/mroth/naturecommits.png?branch=master)](http://travis-ci.org/mroth/naturecommits)
2
-
3
1
  # git + webcam = lol
4
2
 
5
3
  Takes a snapshot with your Mac's built-in iSight/FaceTime webcam (or any working webcam on Linux) every time you git commit code, and archives a lolcat style image with it.
6
4
 
7
5
  By default, the lolimages are stored by a Github style short SHA in a `~/.naturecommits` directory created for you.
8
6
 
7
+ This is a fork of [lolcommits](https://github.com/mroth/lolcommits) with Amazon S3 support added.
8
+
9
9
  ## Installation (Mac OS X)
10
10
  You'll need ImageMagick installed. [Homebrew](http://mxcl.github.com/homebrew/) makes this easy. Simply do:
11
11
 
@@ -28,8 +28,19 @@ You're all set! To enable naturecommits for a git repo, go to the base director
28
28
 
29
29
  Likewise, you can disable it via `naturecommits --disable`. For a full list of options, you can do `naturecommits --help`.
30
30
 
31
- ## Amazon S3
32
- You will also need the yaml config file in your root, which you can get from me. This sets up your connection to Amazon S3 account.
31
+ ## Installation (Linux and Windows)
32
+
33
+ I have only tested this on Mac, for Windows and Linux instructions please see the original [lolcommits](https://github.com/mroth/lolcommits)
34
+
35
+ ## Configuration
36
+ For Amazon S3 to work you will need a yaml config file in your root called `naturecommits.yaml`, this sets up your connection to Amazon S3 account. This should be in the format shown below with your amazon access keys, a username (no spaces), and the name of the bucket where the images are to be stored.
37
+
38
+ ---
39
+ amazon:
40
+ access_key: ACCESS_KEY_HERE
41
+ secret_key: SECRET_KEY_HERE
42
+ user: jbloggs
43
+ bucket: naturecommits
33
44
 
34
45
  ## Options
35
46
  naturecommits has some options for additional lulz. You can enable via
@@ -1,3 +1,3 @@
1
1
  module NATURECOMMITS
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/naturecommits.rb CHANGED
@@ -17,12 +17,18 @@ module NATURECOMMITS
17
17
  LOLBASEDIR = File.join $home, ".naturecommits"
18
18
  naturecommits_ROOT = File.join(File.dirname(__FILE__), '..')
19
19
 
20
- # Specify and load config
21
- CONFIG_FILE = '/naturecommits.yaml'
22
- $config = YAML::load(File.open(CONFIG_FILE))
23
- $ACCESS = $config['amazon']['access_key']
24
- $SECRET = $config['amazon']['secret_key']
25
- $USER = $config['user']
20
+ begin
21
+ # Specify and load config
22
+ CONFIG_FILE = '/naturecommits.yaml'
23
+ $config = YAML::load(File.open(CONFIG_FILE))
24
+ $ACCESS = $config['amazon']['access_key']
25
+ $SECRET = $config['amazon']['secret_key']
26
+ $USER = $config['user']
27
+ $BUCKET = $config['bucket']
28
+ rescue
29
+ puts "Cannot find naturecommits.yaml, or the configuration is wrong. Please ensure the file is in your root and correctly formatted."
30
+ exit 1
31
+ end
26
32
 
27
33
  def is_mac?
28
34
  RUBY_PLATFORM.downcase.include?("darwin")
@@ -181,7 +187,7 @@ module NATURECOMMITS
181
187
  local_file = "#{loldir}/#{$USER}_#{commit_sha}.jpg"
182
188
 
183
189
  # bucket & mime-type
184
- bucket = 'naturecommits'
190
+ bucket = $BUCKET
185
191
  mime_type = 'image/jpeg'
186
192
 
187
193
  AWS::S3::Base.establish_connection!(
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naturecommits
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Kilgour
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-05-22 00:00:00 Z
18
+ date: 2012-05-23 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rake