programmable-ventouse 0.0.5 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/ventouse.rb CHANGED
@@ -5,4 +5,25 @@ require 'ventouse/rename_type_column'
5
5
  require 'ventouse/rescue_ext'
6
6
  require 'ventouse/resource_as_root'
7
7
 
8
- require 'ventouse/mysql_initializer'
8
+ unless Gem.available? 'mysql' or Gem.available? 'mysqlplus'
9
+ require 'ventouse/mysql_compat'
10
+ puts "Pure ruby mysql.rb driver used!"
11
+ end
12
+
13
+ class Ventouse
14
+ def self.disable_rails_transactions
15
+ require 'ventouse/disable_transactions'
16
+ end
17
+
18
+ #http://snippets.dzone.com/posts/show/2137
19
+ def self.random_pronouncable_password(size = 6)
20
+ c = %w(b c d f g h j k l m n p qu r s t v w x z ch cr fr nd ng nk nt ph pr rd sh sl sp st th tr)
21
+ v = %w(a e i o u y)
22
+ f, r = true, ''
23
+ (size * 2).times do
24
+ r << (f ? c[rand * c.size] : v[rand * v.size])
25
+ f = !f
26
+ end
27
+ r
28
+ end
29
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: programmable-ventouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilia Ablamonov
@@ -39,7 +39,6 @@ files:
39
39
  - lib/ventouse/filter_prefix.rb
40
40
  - lib/ventouse/module_declarations.rb
41
41
  - lib/ventouse/mysql_compat.rb
42
- - lib/ventouse/mysql_initializer.rb
43
42
  - lib/ventouse/rename_type_column.rb
44
43
  - lib/ventouse/rescue_ext.rb
45
44
  - lib/ventouse/resource_as_root.rb
@@ -49,8 +48,7 @@ homepage: http://github.com/programmable/ventouse
49
48
  post_install_message:
50
49
  rdoc_options:
51
50
  - --quiet
52
- - --main
53
- - README
51
+ - --main=README
54
52
  - --inline-source
55
53
  - --charset=UTF-8
56
54
  require_paths:
@@ -1,4 +0,0 @@
1
- unless Gem.available? 'mysql' or Gem.available? 'mysqlplus'
2
- require 'mysql_compat'
3
- puts "Pure ruby mysql.rb driver used!"
4
- end