lacey-rails 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe5f98d1efee81de7a188266f29599914078b211
4
- data.tar.gz: ea0304beb306a86f69d3fcf3850b064a9d1b3977
3
+ metadata.gz: 69f076ae1d57d71c0558f9b1b78d141568b9f242
4
+ data.tar.gz: 4f6f65717dcb80eb6fb0178adf457143782c74ee
5
5
  SHA512:
6
- metadata.gz: 9c3e8f1dbe999d0ce506dc2f7d4d436c005e94f338d498be8124cb3d06b265ee347a858e132b999ee6db5b39d0310f30fd0f38bbc281dbfa5ffa0e4494bf2bd8
7
- data.tar.gz: 6825622e0ad439aabfa391b9f6b04183b1383b9005d4221d12427d9c6f886aa593eb99509de2885746da9c500326ea3e0375d97e3d027ffeb1bfada2425fea89
6
+ metadata.gz: 5c9ac8c0128cfaee63208897ced17b6ee3cf4fbe51d300ca457c00d84091617b7869563d3f3b1d0849941fa67a267079a76fea2d6e3792094e29872dc2a0700b
7
+ data.tar.gz: 56e8fb89d223df3e2dc94bfd30b455a59494c5f9992167db592e29bb11946f9a96c1cd560e3d1a1165f4ee9e4f2bd7ae61274fc71da602cf16804251739b9034
@@ -1,5 +1,5 @@
1
1
  module Lacey
2
2
  module Rails
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -16,7 +16,7 @@ App.prototype.register_module = function (module_name, module) {
16
16
  }
17
17
  this.modules.push(module_name);
18
18
  this[module_name] = (function () {
19
- var create, get_instance, instance;
19
+ var initialize, get_instance, instance;
20
20
  instance = null;
21
21
  get_instance = function () {
22
22
  if (instance == null) {
@@ -24,17 +24,16 @@ App.prototype.register_module = function (module_name, module) {
24
24
  }
25
25
  return instance;
26
26
  };
27
- create = function () {
28
- if (instance != null) {
29
- throw 'DuplicateModuleError - this module has been already created';
27
+ initialize = function () {
28
+ if (instance == null) {
29
+ var module = get_instance();
30
+ if (typeof module.init == 'function')
31
+ module.init()
30
32
  }
31
- var module = get_instance();
32
- if (typeof module.init == 'function')
33
- module.init()
34
33
  return module;
35
34
  };
36
35
  return {
37
- create: create,
36
+ initialize: initialize,
38
37
  get_instance: get_instance
39
38
  };
40
39
  })();
@@ -1 +1 @@
1
- window.App=function(t){if("string"!=typeof t||""==t)throw"InvalidAppNameError - you must give a valid name to your lacey app";return this.app_name=t,this.modules=[],this},App.prototype.register_module=function(t,e){if("string"!=typeof t||""==t)throw"InvalidModuleNameError - you must give a valid name to your module";if("function"!=typeof e)throw"InvalidModuleError - your module must be a function";return this.modules.push(t),this[t]=function(){var t,n,o;return o=null,n=function(){return null==o&&(o=new e),o},t=function(){if(null!=o)throw"DuplicateModuleError - this module has been already created";var t=n();return"function"==typeof t.init&&t.init(),t},{create:t,get_instance:n}}(),this[t]};
1
+ window.App=function(t){if("string"!=typeof t||""==t)throw"InvalidAppNameError - you must give a valid name to your lacey app";return this.app_name=t,this.modules=[],this},App.prototype.register_module=function(t,n){if("string"!=typeof t||""==t)throw"InvalidModuleNameError - you must give a valid name to your module";if("function"!=typeof n)throw"InvalidModuleError - your module must be a function";return this.modules.push(t),this[t]=function(){var t,i,o;return o=null,i=function(){return null==o&&(o=new n),o},t=function(){if(null==o){var t=i();"function"==typeof t.init&&t.init()}return t},{initialize:t,get_instance:i}}(),this[t]};
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lacey-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - alexzicat
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-06 00:00:00.000000000 Z
11
+ date: 2015-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -51,8 +51,6 @@ files:
51
51
  - LICENSE.txt
52
52
  - README.md
53
53
  - Rakefile
54
- - bin/console
55
- - bin/setup
56
54
  - lacey-rails.gemspec
57
55
  - lib/lacey/rails.rb
58
56
  - lib/lacey/rails/version.rb
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "lacey/rails"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- # Do any other automated setup that you need to do here